add quntiganhi and gptfenxi
This commit is contained in:
+21
-1
@@ -1,10 +1,27 @@
|
||||
from django.urls import path
|
||||
from django.urls import path,re_path
|
||||
|
||||
from server.views.mind_map import *
|
||||
from server.views.jump import *
|
||||
from server.views.user import *
|
||||
from server.view_test import *
|
||||
from server_auth.lib.auth import *
|
||||
from rest_framework_swagger.views import get_swagger_view
|
||||
from rest_framework.documentation import include_docs_urls
|
||||
from drf_yasg.views import get_schema_view
|
||||
from drf_yasg import openapi
|
||||
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
title="Lemon API接口文档平台", # 必传
|
||||
default_version='v1', # 必传
|
||||
description="这是一个美轮美奂的接口文档",
|
||||
terms_of_service="http://api.keyou.site",
|
||||
contact=openapi.Contact(email="keyou100@qq.com"),
|
||||
license=openapi.License(name="BSD License"),
|
||||
),
|
||||
public=True,
|
||||
# permission_classes=(permissions.AllowAny,), # 权限类
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
# ---------------------------------------------------
|
||||
@@ -12,6 +29,9 @@ urlpatterns = [
|
||||
# path('teacher_login',teacher_login),
|
||||
path('teacher_login', LoginView_teacher.as_view()), # 用户登录
|
||||
|
||||
re_path(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
|
||||
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||
# ---------------------------------------------------
|
||||
path('', to_dashboard), # 跳转列表界面
|
||||
path('2_d', to_detail), # 跳转详情界面
|
||||
|
||||
Reference in New Issue
Block a user