예제 #1
0
def view(request, id):
    contact = get_object_or_404(Contact, id=id)
    comments = comment_block(request, contact)
    return render(request, 'contacts/view.html', {
        'title': _('Contact'),
        'comments': comments,
        'contact': contact
    })
예제 #2
0
파일: order.py 프로젝트: frecar/focus
def view(request, id):
    order = Order.objects.filter_current_company().get(id=id)
    comments = comment_block(request, order)
    who_can_see_this = order.who_has_permission_to('view')

    return render(request, "orders/view.html", {'title': order.title,
                                                'order': order,
                                                'comments': comments,
                                                'who_can_see_this': who_can_see_this})
예제 #3
0
파일: project.py 프로젝트: frecar/focus
def view(request, id):
    project = Project.objects.get(id=id)
    comments = comment_block(request, project)
    who_can_see_this = project.who_has_permission_to('view')
    return render(request, 'projects/view.html', {'title': 'Prosjekt: %s' % project,
                                                  'comments': comments,
                                                  'project': project,
                                                  'who_can_see_this': who_can_see_this,
                                                  })
예제 #4
0
파일: customer.py 프로젝트: frecar/focus
def view(request, id):
    customer = Core.current_user().get_permitted_objects("VIEW", Customer).get(id=id)

    comments = comment_block(request, customer)
    form = CustomerForm(instance=customer, initial={'cid': customer.cid})

    return render(request, 'customers/view.html', {'title': _('Customer: ') + customer.name,
                                                   'comments': comments,
                                                   'customer': customer,
                                                   'form': form})
예제 #5
0
파일: project.py 프로젝트: bopopescu/focus
def view(request, id):
    project = Project.objects.get(id=id)
    comments = comment_block(request, project)
    who_can_see_this = project.who_has_permission_to('view')
    return render(
        request, 'projects/view.html', {
            'title': 'Prosjekt: %s' % project,
            'comments': comments,
            'project': project,
            'who_can_see_this': who_can_see_this,
        })
예제 #6
0
def view(request, id):
    order = Order.objects.filter_current_company().get(id=id)
    comments = comment_block(request, order)
    who_can_see_this = order.who_has_permission_to('view')

    return render(
        request, "orders/view.html", {
            'title': order.title,
            'order': order,
            'comments': comments,
            'who_can_see_this': who_can_see_this
        })
예제 #7
0
def view(request, id):
    customer = Core.current_user().get_permitted_objects("VIEW",
                                                         Customer).get(id=id)

    comments = comment_block(request, customer)
    form = CustomerForm(instance=customer, initial={'cid': customer.cid})

    return render(
        request, 'customers/view.html', {
            'title': _('Customer: ') + customer.name,
            'comments': comments,
            'customer': customer,
            'form': form
        })
예제 #8
0
파일: views.py 프로젝트: frecar/focus
def view(request, id):
    contact = get_object_or_404(Contact, id=id)
    comments = comment_block(request, contact)
    return render(request, 'contacts/view.html',
            {'title': _('Contact'), 'comments': comments, 'contact': contact})