修改部门管理

This commit is contained in:
xie7654
2025-06-30 17:33:47 +08:00
parent f6e68e37c8
commit bfe190ef74
9 changed files with 260 additions and 38 deletions

View File

@@ -148,7 +148,24 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media') #自己在根目录下创建media
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS': 'utils.pagination.CustomPagination',
'PAGE_SIZE': 20,
'DEFAULT_FILTER_BACKENDS': (
'rest_framework.filters.OrderingFilter',
'django_filters.rest_framework.DjangoFilterBackend',
'rest_framework.filters.SearchFilter',
),
'DEFAULT_AUTHENTICATION_CLASSES': [
'utils.authentication.BearerTokenAuthentication',
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
]
}
# celery 配置
CELERY_BROKER_URL = 'redis://localhost:6379/6'