from django.contrib import admin
from django.urls import include, path

import predict
from djangoProject import settings
from django.conf.urls.static import static


from app01 import views
from predict.views import upload_and_detect
from edge_core import views as edge_views

urlpatterns = [
    path('admin/', admin.site.urls),

    path('accounts/', include('app01.urls')),
    path('', include('app01.urls')),

    path('register/', views.user_register, name='register'),

    path('info/list/', views.info_list),
    path('info/delete', views.info_delete),
    path('home/', views.home,name='home'),
    path('base/', views.base),
    path('predict/', views.predict,name='predict'),
    path('profile/', views.profile,name='profile'),
    path('PAD_predict/', views.PAD_predict, name='PAD_predict'),
    path('predict/', include('predict.urls')),
    path('PAD_predict/', include('PAD_predict.urls')),
    path('announcement/', include('announcement.urls', namespace='announcement')),
    path('shape_detection_results/', views.shape_detection_results, name='shape_detection_results'),
    path('PAD_detection_results/', views.PAD_detection_results, name='PAD_detection_results'),
    path('multi_model_detection/', include('multi_model_detection.urls')),
    path('encyclopedia/', include('encyclopedia.urls')),
    path('feedback/', include('feedback.urls')),
    path('dashboard/', views.dashboard_view, name='dashboard'),
    # 数据 API 路由
    path('api/dashboard_data/', views.dashboard_data, name='dashboard_data'),
    path('edge/dashboard/', edge_views.edge_dashboard, name='edge_dashboard'),
    path('edge/video_feed/', edge_views.video_feed, name='video_feed'),
    path('edge/get_metrics/', edge_views.get_metrics, name='get_metrics'),
]


from django.contrib import admin

admin.site.site_header = '茄子智能检测系统管理后台'
admin.site.site_title = '管理后台'
admin.site.index_title = '系统核心数据管理'

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)








