from django.conf.urls import patterns, url from api.views import VideoListView, VideoDetailView, ShareView, UploadView, ShareDetailView, ShareListView, NotifyView, \ VideoModifyView, VideoDetailHiddenView, VideoOrderView, ShareRecommendView, RecordView, ClickView, \ VideoSubTitleView, \ WechatTokenView, BannerListView, ClassificationListView, UpdateView, OutPutView, ChangeVideoOrderView urlpatterns = patterns( '', url(r'videos', VideoListView.as_view()), url(r'video/(?P<id>(\d)+)/like', VideoModifyView.as_view()), url(r'video/(?P<id>(\d)+)/subtitle', VideoSubTitleView.as_view()), url(r'video/(?P<id>(\d)+)/order', VideoOrderView.as_view()), url(r'video/(?P<id>(\d)+)/hidden', VideoDetailHiddenView.as_view()), url(r'video/(?P<id>(\d)+)', VideoDetailView.as_view()), url(r'shares', ShareListView.as_view()), url(r'share/(?P<id>(\d)+)/recommend', ShareRecommendView.as_view()), url(r'share/(?P<id>(\d)+)', ShareDetailView.as_view()), url(r'share', ShareView.as_view()), url(r'record', RecordView.as_view()), url(r'upload', UploadView.as_view()), url(r'notify', NotifyView.as_view()), url(r'click', ClickView.as_view()), url(r'banners', BannerListView.as_view()), url(r'classifications', ClassificationListView.as_view()), url(r'update', UpdateView.as_view()), url(r'wechat/token', WechatTokenView.as_view()), url(r'output', OutPutView.as_view()), url(r'change', ChangeVideoOrderView.as_view()), )
urlpatterns = [ path('admin/', admin.site.urls), path('classrooms/', views.classroom_list, name='classroom-list'), path('classrooms/<int:classroom_id>/', views.classroom_detail, name='classroom-detail'), path('classrooms/create', views.classroom_create, name='classroom-create'), path('classrooms/<int:classroom_id>/update/', views.classroom_update, name='classroom-update'), path('classrooms/<int:classroom_id>/delete/', views.classroom_delete, name='classroom-delete'), path('api/list/', ClassroomListView.as_view(), name='api-list'), path('detail/<int:classroom_id>/', DetailView.as_view(), name='detail'), path('api/create/', CreateView.as_view(), name='api-create'), path('api/<int:classroom_id>/update/', UpdateView.as_view(), name='api-update'), path('api/<int:classroom_id>/delete/', DeleteView.as_view(), name='api-delete'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls.static import static from classes import views from api.views import ( ListView, DetailView, CreateView, UpdateView, DeleteView, ) urlpatterns = [ path('admin/', admin.site.urls), path('classrooms/', views.classroom_list, name='classroom-list'), path('classrooms/<int:classroom_id>/', views.classroom_detail, name='classroom-detail'), path('classrooms/create', views.classroom_create, name='classroom-create'), path('classrooms/<int:classroom_id>/update/', views.classroom_update, name='classroom-update'), path('classrooms/<int:classroom_id>/delete/', views.classroom_delete, name='classroom-delete'), path('api/list/', ListView.as_view(), name='api-list'), path('api/<int:classroom_id>/', DetailView.as_view(), name='api-detail'), path('api/create', CreateView.as_view(), name='api-create'), path('api/<int:classroom_id>/update/', UpdateView.as_view(), name='api-update'), path('api/<int:classroom_id>/delete/', DeleteView.as_view(), name='api-delete'), ] if settings.DEBUG: urlpatterns+=static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns+=static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns = [ path('', home, name='home'), path('signup/', Signup.as_view(), name='signup'), path('login/', Login.as_view(), name='login'), path('logout/', Logout.as_view(), name='logout'), path('list/', event_list, name='event-list'), path('create/', create_event, name='create-event'), path('detail/<int:event_id>', event_detail, name='event-detail'), path('update/<int:event_id>', event_update, name='event-update'), path('dashboard/', dashboard, name='dashboard'), path('my_list/', my_list, name='my-list'), path('booking/<int:event_id>', booking, name='event-book'), # API paths path('api/list/', ListView.as_view(), name='api-list'), path('api/organizer-events/', ListEventsView.as_view(), name='api-event-list'), path('api/login/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/register/', Register.as_view(), name="register"), path('api/update/<int:object_id>', UpdateView.as_view(), name='api-update'), path('api/create/', EventCreateView.as_view(), name='api-create'), path('api/booked-events/', BookEventList.as_view(), name='api-event-book'), path('api/book/', Book.as_view(), name='book'), path('api/events/<int:event_id>/bookings/', EventUsers.as_view(), name='users') ]
from classes import views from api.views import ListView, DetailView, CreateView, UpdateView, DeleteView urlpatterns = [ path('admin/', admin.site.urls), path('classrooms/', views.classroom_list, name='classroom-list'), path('classrooms/<int:classroom_id>/', views.classroom_detail, name='classroom-detail'), path('classrooms/create', views.classroom_create, name='classroom-create'), path('classrooms/<int:classroom_id>/update/', views.classroom_update, name='classroom-update'), path('classrooms/<int:classroom_id>/delete/', views.classroom_delete, name='classroom-delete'), path('api/list/', ListView.as_view(), name='list'), path('api/detail/<int:classroom_id>/', DetailView.as_view(), name='detail'), path('api/create/<int:classroom_id>/', CreateView.as_view(), name='create'), path('api/update/<int:classroom_id>/', UpdateView.as_view(), name='update'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)