更新
This commit is contained in:
@@ -81,17 +81,14 @@ INSTALLED_APPS = [
|
||||
'channels',
|
||||
'drf_spectacular',
|
||||
|
||||
# Local apps
|
||||
'hertz_demo',
|
||||
'hertz_studio_django_captcha',
|
||||
'hertz_studio_django_auth', # 权限管理系统
|
||||
'hertz_studio_django_notice', # 通知公告模块
|
||||
'hertz_studio_django_ai',
|
||||
# 必备注册的app,不要删
|
||||
'hertz_demo', # 初始化演示模块
|
||||
'hertz_studio_django_captcha', # 验证码模块
|
||||
'hertz_studio_django_auth', # 权限模块
|
||||
'hertz_studio_django_system_monitor', # 系统监测模块
|
||||
'hertz_studio_django_log', # 日志管理模块
|
||||
'hertz_studio_django_wiki', # 知识管理模块
|
||||
'hertz_studio_django_codegen', # 代码生成模块
|
||||
'hertz_studio_django_yolo', # YOLO目标检测模块
|
||||
|
||||
# ======在下面导入你需要的app======
|
||||
|
||||
]
|
||||
|
||||
|
||||
@@ -19,53 +19,35 @@ from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
|
||||
from . import views
|
||||
from hertz_studio_django_captcha import urls as captcha_urls
|
||||
import sys
|
||||
from pathlib import Path
|
||||
_BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(_BASE_DIR))
|
||||
from hertz_studio_django_codegen import urls as codegen_urls
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
# API documentation routes
|
||||
path('api/docs/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
|
||||
path('api/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
|
||||
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
|
||||
|
||||
# 首页路由
|
||||
path('', views.index, name='index'),
|
||||
|
||||
# Hertz Captcha routes
|
||||
path('api/captcha/', include(captcha_urls)),
|
||||
path('api/captcha/', include('hertz_studio_django_captcha.urls')),
|
||||
|
||||
# Hertz Auth routes
|
||||
path('api/', include('hertz_studio_django_auth.urls')),
|
||||
|
||||
# Demo app routes
|
||||
path('', include('hertz_demo.urls')),
|
||||
|
||||
# Hertz AI routes
|
||||
path('api/ai/', include('hertz_studio_django_ai.urls')),
|
||||
|
||||
|
||||
# Hertz System Monitor routes
|
||||
path('api/system/', include('hertz_studio_django_system_monitor.urls')),
|
||||
|
||||
# Hertz System Notification routes
|
||||
path('api/notice/', include('hertz_studio_django_notice.urls')),
|
||||
|
||||
|
||||
# Hertz Log routes
|
||||
path('api/log/', include('hertz_studio_django_log.urls')),
|
||||
|
||||
## Hertz Wiki routes
|
||||
path('api/wiki/', include('hertz_studio_django_wiki.urls')),
|
||||
|
||||
# Hertz Codegen routes
|
||||
path('api/codegen/', include((codegen_urls, 'codegen'), namespace='codegen')),
|
||||
|
||||
# Hertz YOLO routes
|
||||
path('api/yolo/', include('hertz_studio_django_yolo.urls')),
|
||||
|
||||
|
||||
|
||||
# API documentation routes
|
||||
path('api/docs/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
|
||||
path('api/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
|
||||
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
|
||||
|
||||
# ===========在下面添加你需要的路由===========
|
||||
|
||||
]
|
||||
|
||||
# 在开发环境下提供媒体文件服务
|
||||
|
||||
Reference in New Issue
Block a user