add quntiganhi and gptfenxi

This commit is contained in:
2024-11-18 14:54:36 +08:00
parent 9434b11aef
commit 322edcf1e4
13 changed files with 186 additions and 435 deletions
+6 -3
View File
@@ -40,20 +40,23 @@ INSTALLED_APPS = [
'server',
'server_auth',
'channels',
'django_filters' # 注册过滤
'rest_framework_swagger',
'django_filters', # 注册过滤
'drf_yasg'
]
REST_FRAMEWORK = {
# 全局过滤
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination'
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'DEFAULT_SCHEMA_CLASS':'rest_framework.schemas.coreapi.AutoSchema'
}
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
# 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',