exercise order by type
This commit is contained in:
parent
fe990fc9fb
commit
7c4ad07827
|
@ -226,7 +226,7 @@ class QuestionViewSet(ModelViewSet):
|
||||||
class ExerciseView(APIView):
|
class ExerciseView(APIView):
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
questioncat = request.data['questioncat']
|
questioncat = request.data['questioncat']
|
||||||
queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('id')
|
queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('type')
|
||||||
if 'ydtms' in request.data and request.data['ydtms']:
|
if 'ydtms' in request.data and request.data['ydtms']:
|
||||||
queryset = queryset.exclude(id__in = request.data['ydtms'])
|
queryset = queryset.exclude(id__in = request.data['ydtms'])
|
||||||
count = queryset.count()
|
count = queryset.count()
|
||||||
|
|
Loading…
Reference in New Issue