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 })
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})
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, })
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})
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, })
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 })
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 })
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})