更新
This commit is contained in:
@@ -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