В Dajngo rest добавлена возможность получать структуру МИ ФНС по ЦОД, в frontend создан предварительный шаблон
This commit is contained in:
1 parent
0ac19fe330
commit
ec5b456d30
8 files changed
+191
-287
No files matched your search
@@ -1,6 +1,6 @@
|
||||
from rest_framework.generics import ListAPIView
|
||||
from django.db.models import Q
|
||||
from userauth.models import DictEmployee
|
||||
from userauth.models import DictEmployee, DictPosition
|
||||
from datetime import date
|
||||
from .models import *
|
||||
from .serializers import *
|
||||
@@ -24,3 +24,8 @@ class GetInspectionDirections(ListAPIView):
|
||||
serializer_class = InspectionDirectionsSerializer
|
||||
# отключает вывод информации о пагинации(count,previous,next, results)
|
||||
paginator = None
|
||||
|
||||
class GetStructure(ListAPIView):
|
||||
def get(self, request):
|
||||
queryset = DictEmployee.objects.filter(id_dict_position__order_position__lte = 2, deleted=0).order_by('id_dict_position__order_position')
|
||||
return Response(StructureSerializer(queryset, many=True).data)
|
||||
Reference in new issue
Block a user