mirror of
https://github.com/hequan2017/seal.git
synced 2026-10-31 04:14:32 +08:00
fix: 修复 246 个 Dependabot 依赖漏洞
- requirements.txt 由 2019 年 pip freeze 快照重写为直接依赖清单(Python>=3.10) - Django 2.2.4 -> 5.2.16,DRF 3.9.2 -> 3.17.2,channels 2.2 -> 4.3,celery 4.1 -> 5.5 - 移除代码未使用的 apache-airflow/tornado/GitPython/numpy/thrift/lxml/SQLAlchemy/Mako/Werkzeug/gevent/autobahn/ipython 等历史依赖(含 system/tests.py 中的 airflow 示例) - 已停维的 django-rest-swagger/DRF coreapi 文档替换为 drf-spectacular - celery.platforms/C_FORCE_ROOT/CELERYBEAT_SCHEDULE 按 celery 5 规范迁移 - asgi.py 迁移至 channels 4 入口写法;graphene-django 升级至 3.x(schema 增加 fields) - static/js/jquery-3.1.1.min.js(XSS 漏洞)替换为 jquery-3.7.1 并更新模板引用
This commit is contained in:
54
seal/urls.py
54
seal/urls.py
@@ -1,30 +1,24 @@
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.conf.urls import include
|
||||
from system.views import index
|
||||
from rest_framework.authtoken import views
|
||||
from rest_framework.documentation import include_docs_urls
|
||||
from graphene_django.views import GraphQLView
|
||||
from seal.schema import schema
|
||||
from rest_framework_swagger.views import get_swagger_view
|
||||
|
||||
schema_view = get_swagger_view(title='海豹 API 文档')
|
||||
|
||||
API_TITLE = '海豹 API 文档'
|
||||
API_DESCRIPTION = '海豹 API 文档'
|
||||
|
||||
urlpatterns = [
|
||||
path('', index),
|
||||
path('index', index, name="index"),
|
||||
path('system/', include('system.urls', namespace='system')),
|
||||
path('assets/', include('assets.urls', namespace='assets')),
|
||||
path('k8s/', include('k8s.urls', namespace='k8s')),
|
||||
path('admin/', admin.site.urls, ),
|
||||
path('api/token', views.obtain_auth_token),
|
||||
path('api/docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION, authentication_classes=[],
|
||||
permission_classes=[])),
|
||||
path('api/docs2/', schema_view, name="docs"),
|
||||
path('graphql/', GraphQLView.as_view(graphiql=True, schema=schema)),
|
||||
|
||||
path('sql/', include('sql.urls', namespace='sql')),
|
||||
]
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.conf.urls import include
|
||||
from system.views import index
|
||||
from rest_framework.authtoken import views
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||
from graphene_django.views import GraphQLView
|
||||
from seal.schema import schema
|
||||
|
||||
urlpatterns = [
|
||||
path('', index),
|
||||
path('index', index, name="index"),
|
||||
path('system/', include('system.urls', namespace='system')),
|
||||
path('assets/', include('assets.urls', namespace='assets')),
|
||||
path('k8s/', include('k8s.urls', namespace='k8s')),
|
||||
path('admin/', admin.site.urls, ),
|
||||
path('api/token', views.obtain_auth_token),
|
||||
# Swagger UI 与 OpenAPI Schema(drf-spectacular,替代已停维的 django-rest-swagger)
|
||||
path('api/docs/', SpectacularSwaggerView.as_view(url_name='docs2'), name="docs"),
|
||||
path('api/docs2/', SpectacularAPIView.as_view(), name="docs2"),
|
||||
path('graphql/', GraphQLView.as_view(graphiql=True, schema=schema)),
|
||||
|
||||
path('sql/', include('sql.urls', namespace='sql')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user