# _*_ coding: utf-8 _*_ __author__ = 'Joe' __date = '17/6/18 下午1:58' from django.conf.urls import url, include from courses.views import CourseView, CourseDetlView, CourseInfoView, CourseCommentView, CourseAddCommentView urlpatterns = [ #课程机构首页 url(r'^list/$', CourseView.as_view(), name="course_list"), url(r'^detl/(?P<course_id>\d+)/$', CourseDetlView.as_view(), name="course_detl"), url(r'^info/(?P<course_id>\d+)/$', CourseInfoView.as_view(), name="course_info"), url(r'^comment/(?P<course_id>\d+)/$', CourseCommentView.as_view(), name="course_comment"), url(r'^add_comment/$', CourseAddCommentView.as_view(), name="course_add_comment"), ]
from django.urls import path from courses.views import CourseView, ExamCourseViseView urlpatterns = [ path('get_all/', CourseView.as_view()), path('exams/', ExamCourseViseView.as_view()), ]
url(r'^ggv/slideutility/$', csvutilslides, name='slideutil'), # url(r'^ggv/utility/validator/$', worksheetvalidator.as_view(), name='worksheet_utility'), # slides are independent files but protected here. url(r'^ggv/slidestack/(?P<pk>\d+)/$', SlideStackInfoView.as_view(), name='slide_info_view'), url(r'^ggv/slidestack/edit/(?P<pk>\d+)/$', SlideStackUpdateView.as_view(), name='slide_update'), # AttendanceUpdateAllView url(r'^ggv/update-attendance/$', AttendanceUpdateAllView.as_view(), name='update_attendance_all'), # GGV Organizations url(r'^ggv/organization/(?P<pk>\d+)/$', GgvOrgAdminView.as_view(), name='manage_org'), url(r'^ggv/organization/(?P<pk>\d+)/activity-report/$', GgvOrgUserActivityReportView.as_view(), name='report_org_activity'), # GGV Courses url(r'^ggv/(?P<crs_slug>[-\w]+)/$', CourseView.as_view(), name='course'), url(r'^ggv/(?P<crs_slug>[-\w]+)/edit/$', CourseUpdateView.as_view(), name='edit_course'), # course user stats: url(r'^ggv/(?P<crs_slug>[-\w]+)/report/$', CourseUserReportView.as_view(), name='report_course'), url(r'^ggv/(?P<crs_slug>[-\w]+)/activity-report/$', CourseUserActivityReportView.as_view(), name='report_course_activity'), url(r'^ggv/(?P<crs_slug>[-\w]+)/full-activity-report/$', CourseUserActivityFullReportView.as_view(), name='report_full_course_activity'), url(r'^ggv/(?P<crs_slug>[-\w]+)/manage/$', CourseManageView.as_view(), name='manage_course'), url(r'^ggv/(?P<crs_slug>[-\w]+)/manage/user/(?P<user>\d+)/$', UserManageView.as_view(), name='manage_user'), url(r'^ggv/(?P<crs_slug>[-\w]+)/progress/user/(?P<user>\d+)/$', UserProgressView.as_view(), name='user_progress'), url(r'^ggv/(?P<crs_slug>[-\w]+)/attendance/update/(?P<pk>\d+)/$', AttendanceAjaxCodeUpdateView.as_view(), name='course_attendance_update'), url(r'^ggv/(?P<crs_slug>[-\w]+)/attendance/delete/(?P<pk>\d+)/$', AttendanceAjaxCodeDeleteView.as_view(), name='course_attendance_delete'), url(r'^ggv/(?P<crs_slug>[-\w]+)/attendance/add/(?P<user>\d+)/$', AttendanceAjaxCodeCreateView.as_view(), name='course_attendance_add'),
from django.conf.urls import url, include from django.contrib import admin import xadmin from django.views.static import serve from django.views.generic import TemplateView from .settings import MEDIA_ROOT from users.views import LoginView, RegisterView, ActiveView, LogoutView from courses.views import CourseView urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), # 首页 url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'), url(r'^courses/$', CourseView.as_view(), name='courses'), # 分校和讲师相关urls url(r'^category/', include('category.urls', namespace="category")), # 登录 url(r'^login/$', LoginView.as_view(), name='login'), # 注册 url(r'^register/$', RegisterView.as_view(), name='register'), # 激活 url(r'^active/(?P<code>.*)$', ActiveView.as_view(), name='active'), # 退出 url(r'^logout/$', LogoutView.as_view(), name='logout'), # 验证码相关urls url(r'^captcha/', include('captcha.urls')), # 媒体图片相关urls url(r'media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
from django.conf.urls import patterns, url from django.views.generic.simple import direct_to_template from courses.views import CourseCreate, CourseView, CourseSettings, CourseManage, UserCourses, CourseList, CoursePage from courses import JS_BASE_DIR_COURSE import os urlpatterns = patterns('', url(r'^$', CourseList.as_view(), name="course.list"), url(r'^create/$', CourseCreate.as_view(), name='course.create'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/$', UserCourses.as_view(), name='course.by_user'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/(?P<slug>[0-9a-zA-Z-]+)$', CourseView.as_view(), name='course.view'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/(?P<slug>[0-9a-zA-Z-]+)/settings$', CourseSettings.as_view(), name='course.settings'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/(?P<slug>[0-9a-zA-Z-]+)/manage$', CourseManage.as_view(), name='course.manage'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/(?P<slug>[0-9a-zA-Z-]+)/pages$', CoursePage.as_view(), name='page.first.view'), url(r'^(?P<username>[0-9a-zA-Z@.+_-]+)/(?P<slug>[0-9a-zA-Z-]+)/pages/(?P<pk>\d+)$', CoursePage.as_view(), name='page.view'), )
#! /usr/bin/env python # -*- coding: UTF-8 -*- # Copyright(C), 2019, Zhang Chengwei. # # Author: zhang # DATE: 2019/5/26 16:28 # IDE_NAME: PyCharm # Filename: urls.py # Version: 1.0.0 # Description: # History: from django.urls import path from courses.views import CourseView, CourseDetailView, CourseVideoView, CourseCommentView, AddCommentView urlpatterns = [ path('list/', CourseView.as_view(), name='course_list'), path('<int:course_id>/detail/', CourseDetailView.as_view(), name='course_detail'), path('<int:course_id>/video/', CourseVideoView.as_view(), name='course_video'), path('<int:course_id>/comment/', CourseCommentView.as_view(), name='course_comment'), path('add_comment/', AddCommentView.as_view(), name='add_comment'), ]
my_home, CourseView, CourseDetailView, CourseListView, MyCourseListView, CourseCreateView, CourseUpdateView, CourseDeleteView, ) # Nota: Mi url app name. app_name = 'courses' urlpatterns = [ path('home/', my_home, name='courses-home'), path('', CourseView.as_view(), name='courses-list'), ### Modelo mejorado: Set another "template_name", defined in the "View". path('set/', CourseView.as_view(template_name='main/details.html'), name='courses-list'), path('<int:id>/detail/', CourseDetailView.as_view(), name='my_courses-detail'), path('list/', CourseListView.as_view(), name='my_course_list'), ### This view hereda de "CourseListView" path('my_list/', MyCourseListView.as_view(), name='my_course_list_heredado'), ### Create new object, using formulary path('create/', CourseCreateView.as_view(), name='my_course_create'), path('<int:id>/update/',
from django.urls import path from courses.views import (my_fbv, CourseView, CourseListView, MyListView, CourseCreateView, CourseUpdateView, CourseDeleteView) app_name = 'courses' urlpatterns = [ path('', CourseListView.as_view(), name='course-list'), path('create/', CourseCreateView.as_view(), name='course-create'), path('<int:id>/', CourseView.as_view(), name='course-detail'), path('<int:id>/update/', CourseUpdateView.as_view(), name='course-update'), path('<int:id>/delete/', CourseDeleteView.as_view(), name='course-delete'), ]
# -*- coding: utf-8 -*- from django.conf.urls import url from courses.views import CourseView, CourseDetailView, CourseLessonsView, CourseCommentsView urlpatterns = [ url(r'^list/$', CourseView.as_view(), name='course_list'), url(r'^detail/(?P<course_id>\d+)$', CourseDetailView.as_view(), name='course_detail'), url(r'^lessons/(?P<course_id>\d+)$', CourseLessonsView.as_view(), name='course_lessons'), url(r'^comment/(?P<course_id>\d+)$', CourseCommentsView.as_view(), name='course_comments') ]
from django.contrib import admin from django.urls import path from courses.views import CourseView, CourseListView, CourseCreateView, CourseUpdateView, CourseDeleteView, sendemail urlpatterns = [ path('', CourseListView.as_view(), name="course-list"), path('<int:id>/', CourseView.as_view(), name="course-details"), path('create/', CourseCreateView.as_view(), name="course-create"), path('<int:id>/update/', CourseUpdateView.as_view(), name="course-update"), path('<int:id>/delete/', CourseDeleteView.as_view(), name="course-delete"), path('send/', sendemail, name="send"), ]
from django.urls import re_path from courses.views import CourseView, CourseDetailView, CourseVideoView, CourseCommentView urlpatterns = [ re_path(r'^course_list/$', CourseView.as_view(), name="course_list"), re_path(r'^course_list/(?P<course_id>\d+)/$', CourseDetailView.as_view(), name="course_detail"), re_path(r'^course_video/(?P<course_id>\d+)/$', CourseVideoView.as_view(), name="course_video"), re_path(r'^course_comment/(?P<course_id>\d+)/$', CourseCommentView.as_view(), name="course_comment") ]