Example #1
0
 def vendor_view(self, request, vendor_id):
     context_data = admin_site.each_context(request)
     context_data['data'] = VendorUser.objects.all()
     context_data['site_title'] = ugettext_lazy('Vendor')
     return TemplateResponse(request,
                             'admin/vendor_view.html',
                             context=context_data)
Example #2
0
 def hospital_view(self, request, hospital_id):
     context_data = admin_site.each_context(request)
     context_data['data'] = HospitalUser.objects.get(id=hospital_id)
     context_data['site_title'] = ugettext_lazy('Hospital')
     return TemplateResponse(request,
                             'admin/hospital_view.html',
                             context=context_data)
Example #3
0
 def vehicle_add(self, request, hospital_id):
     context_data = admin_site.each_context(request)
     context_data['data'] = HospitalUser.objects.get(id=hospital_id)
     context_data['category'] = VehicleCategory.objects.all()
     context_data['site_title'] = ugettext_lazy('Hospital')
     return TemplateResponse(request,
                             'admin/hospital/add_vehicle.html',
                             context=context_data)
 def extra_context(self, request):
     context = admin_site.each_context(request)
     context['opts'] = Vendor._meta
     context['site_title'] = ugettext_lazy('Vendor')
     return context
Example #5
0
 def extra_context(self, request):
     context = admin_site.each_context(request)
     context['opts'] = HospitalUser._meta
     context['site_title'] = ugettext_lazy('Hospital')
     return context