This commit is contained in:
caoqianming 2020-06-04 21:39:11 +08:00
parent b0c970b085
commit 006a639ef0
8 changed files with 4 additions and 14 deletions

View File

@ -7,5 +7,5 @@ class UserFilter(filters.FilterSet):
model = User
fields = {
'name': ['exact', 'contains'],
'is_active': ['exact']
'is_active': ['exact'],
}

View File

@ -90,7 +90,7 @@ class PositionViewSet(ModelViewSet):
queryset = Position.objects.all()
serializer_class = PositionSerializer
pagination_class = None
search_fields = ['^name']
search_fields = ['name','desc']
ordering_fields = ['id']
ordering = 'id'
@ -185,7 +185,7 @@ class UserViewSet(ModelViewSet):
serializer.save(password=password)
return Response(serializer.data)
@action(methods=['put'], detail=True, permission_classes=[IsAuthenticated],
@action(methods=['put'], detail=True, permission_classes=[IsAuthenticated], # perms_map={'put':'change_password'}
url_name='change_password')
def password(self, request, pk=None):
"""

Binary file not shown.

View File

@ -1,4 +0,0 @@
@echo off
call venv\scripts\activate.bat
celery -A server beat -l info
pause

View File

@ -1,4 +0,0 @@
@echo off
call venv\scripts\activate.bat
celery -A server worker -l info -P eventlet
pause

View File

@ -1,3 +0,0 @@
@echo off
call venv\scripts\activate.bat
python manage.py runserver

View File

@ -161,6 +161,7 @@ SIMPLE_JWT = {
# 跨域配置
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = False
# Auth配置
AUTH_USER_MODEL = 'system.User'