from django.urls import path from .views import ( CityListView, RedTourismPlanView, get_attraction_image, RedTourismRegenerateView, SaveRedTourismPlanView, UserPlansView, UserCheckInView, UserCheckInListView, UserPlanDetailView, CheckInImageUploadView, UserCheckInUpdateView, UserSpotCheckinsView, CompletePlanView ) from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('cities/', CityListView.as_view(), name='city-list'), # 新增的红色旅游API path('red-tourism/plan/', RedTourismPlanView.as_view(), name='red-tourism-plan'), path('red-tourism/regenerate/', RedTourismRegenerateView.as_view(), name='red-tourism-regenerate'), path('red-tourism/save-plan/', SaveRedTourismPlanView.as_view(), name='save-red-tourism-plan'), path('attractions/image/', get_attraction_image, name='get_attraction_image'), path('user/plans/', UserPlansView.as_view(), name='user-plans'), path('user/checkin/', UserCheckInView.as_view(), name='user-checkin'), path('user/checkins/', UserCheckInListView.as_view(), name='user-checkins-list'), path('upload/checkin-image/', CheckInImageUploadView.as_view(), name='upload_checkin_image'), path('user/plans//', UserPlanDetailView.as_view(), name='user-plan-detail'), path('user/checkin/update/', UserCheckInUpdateView.as_view(), name='checkin-update'), path('user/spot-checkins/', UserSpotCheckinsView.as_view(), name='user-spot-checkins'), path('user/plans//complete/', CompletePlanView.as_view(), name='complete-plan'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)