def get_queryset(self): show_extinfo = self.request.GET.get('extinfo',0) latest = self.request.GET.get('latest',0) my=self.request.GET.get('my',0) project_list = Project.objects.all() if str(my)=='1': project_list=ProjectService.get_projects_include_me(self.request) if str(latest) == '1': project_list=ProjectService.get_latest_projects_include_me(self.request) return project_list
def get_queryset(self): print(self.request.GET) show_extinfo = self.request.GET.get('extinfo',0) latest = self.request.GET.get('latest',0) my=self.request.GET.get('my',0) project_list = Project.objects.all() if str(my)=='1': project_list= ProjectService.get_projects_include_me(self.request) if str(latest) == '1': project_list=ProjectService.get_latest_projects_include_me(self.request) if str(show_extinfo) == "0": ProjectListView.serializer_class = project_serializer.ProjectSampleSerializer else: ProjectListView.serializer_class = project_serializer.ProjectSerializer return project_list