コード例 #1
0
 def get(self, request, *args, **kwargs):
     try:
         project_id = kwargs['project_id']
         context = CommonView.common_datatable_context(self)
         context['project_id'] = project_id
         project = Projects.objects.get(id=project_id)
         context['project'] = project
         return render(request, 'buildings/building.html', context)
     except Exception as e:
         LogHelper.efail(e)
         return redirect('index')
コード例 #2
0
 def get(self, request, *args, **kwargs):
     try:
         building_id = kwargs['building_id']
         context = CommonView.common_datatable_context(self)
         context['building_id'] = building_id
         building = Buildings.objects.get(id=building_id)
         context['building'] = building
         return render(request, 'flats/flat.html', context)
     except Exception as e:
         LogHelper.efail(e)
         return redirect('index')
コード例 #3
0
 def get(self, request):
     context = CommonView.common_datatable_context(self)
     context['sorted_column'] = 0
     context['sorting_order'] = 'desc'
     return render(request, 'projects/project.html', context)
コード例 #4
0
 def get(self, request):
     context = CommonView.common_datatable_context(self)
     return render(request, 'companies/worker.html', context)