Files
green_classroom/core/urls.py
2025-08-13 18:40:31 +08:00

18 lines
710 B
Python

from django.urls import path, include
from . import views
# 添加以下导入
from django.contrib import admin
urlpatterns = [
path('', views.article_list, name='article_list'),
path('article/<int:article_id>/', views.article_detail, name='article_detail'),
path('run-crawler/', views.run_crawler, name='run_crawler'),
# 新增:检查爬虫状态的路由
path('crawler-status/', views.crawler_status, name='crawler_status'),
# 新增:暂停爬虫的路由
path('pause-crawler/', views.pause_crawler, name='pause_crawler'),
# 添加导出文章的路由
path('export-articles/', views.export_articles, name='export_articles'),
# 添加自定义管理后台的路由
]