Ejemplo n.º 1
0
# _*_ coding:utf-8 _*_
from django.conf.urls import url, include
from courses.views import CourseListView, CourseDetailView, CourseInfoView, CourseCommentsView, AddCommentsView, \
    VideoPlayView

urlpatterns = [
    url(r'^list/$', CourseListView.as_view(), name="course_list"),
    url(r'^detail/(?P<course_id>\d+)/$',
        CourseDetailView.as_view(),
        name="course_detail"),
    url(r'^info/(?P<course_id>\d+)/$',
        CourseInfoView.as_view(),
        name="course_info"),
    #     课程评论
    url(r'^comments/(?P<course_id>\d+)/$',
        CourseCommentsView.as_view(),
        name="course_comments"),

    #     添加课程评论
    url(r'^add_comment/$', AddCommentsView.as_view(), name="add_comment"),

    #     视频播放
    url(r'^video/(?P<video_id>\d+)/$',
        VideoPlayView.as_view(),
        name="video_play"),
]
Ejemplo n.º 2
0
# encoding: utf-8
__author__ = 'mtianyan'
__date__ = '2018/1/13 0013 01:57'

# encoding: utf-8
from courses.views import CourseListView, CourseDetailView, CourseInfoView, CommentsView, AddCommentsView, \
    VideoPlayView
from django.urls import path, re_path

app_name = "courses"
urlpatterns = [
    # 课程列表url
    path('list/', CourseListView.as_view(), name="list"),
    # 课程详情页
    re_path('detail/(?P<course_id>\d+)/', CourseDetailView.as_view(), name="course_detail"),
    # 课程章节信息页
    re_path('info/(?P<course_id>\d+)/', CourseInfoView.as_view(), name="course_info"),

    # 课程章节信息页
    re_path('comments/(?P<course_id>\d+)/', CommentsView.as_view(), name="course_comments"),

    # 添加课程评论,已经把参数放到post当中了
    path('add_comment/', AddCommentsView.as_view(), name="add_comment"),

    # 课程视频播放页
    re_path('video/(?P<video_id>\d+)/', VideoPlayView.as_view(), name="video_play"),
]
Ejemplo n.º 3
0
# *_* coding:utf-8 _*_
__auth__ = 'psj'
__date__ = '2018/6/14 15:27'

from courses.views import CourseListView, CourseDetailView, CourseInfoView, CommentsView, AddCommentsView, VideoPlayView


from django.conf.urls import url

urlpatterns = [
    # 课程列表url
    url(r'^list/$', CourseListView.as_view(), name="course_list"),
    # 课程详情页
    url(r'^course/(?P<course_id>\d+)/$', CourseDetailView.as_view(), name="course_detail"),

    # 课程章节信息页
    url(r'^info/(?P<course_id>\d+)/$', CourseInfoView.as_view(), name="course_info"),

    # 课程评论页
    url(r'^comments/(?P<course_id>\d+)/$', CommentsView.as_view(), name="course_comments"),

    # 添加课程评论,已经把参数放到post当中了
    url('add_comment/', AddCommentsView.as_view(), name="add_comment"),

    # 课程视频播放页
    url(r'^video/(?P<video_id>\d+)/$', VideoPlayView.as_view(), name="video_play"),


]

Ejemplo n.º 4
0
# encoding: utf-8
__author__ = 'mtianyan'
__date__ = '2018/1/13 0013 01:57'

# encoding: utf-8
from courses.views import CourseListView, CourseDetailView, CourseInfoView, CommentsView, AddCommentsView, VideoPlayView
from django.urls import path, re_path

app_name = "courses"
urlpatterns = [
    # 课程列表url
    path('list/', CourseListView.as_view(), name="list"),
    # 课程详情页
    re_path('detail/(?P<course_id>\d+)/', CourseDetailView.as_view(), name="course_detail"),
    # 课程章节信息页
    re_path('info/(?P<course_id>\d+)/', CourseInfoView.as_view(), name="course_info"),

# 课程章节信息页
    re_path('comments/(?P<course_id>\d+)/', CommentsView.as_view(), name="course_comments"),

    # 添加课程评论,已经把参数放到post当中了
    path('add_comment/', AddCommentsView.as_view(), name="add_comment"),

    # 课程视频播放页
    re_path('video/(?P<video_id>\d+)/', VideoPlayView.as_view(), name="video_play"),
]
Ejemplo n.º 5
0
# -*- coding: utf-8 -*-

from django.conf.urls import url, include

from courses.views import CourseListView, CourseDetailView, CourseInfoView, CourseCommentView,AddCommentView,VideoPlayView

urlpatterns = [
    # 课程列表页
    url('^list/$', CourseListView.as_view(), name='course_list'),
    # 课程详情页
    url('^detail/(?P<course_id>\d+)/$', CourseDetailView.as_view(), name='course_detail'),
    # 课程章节页
    url('^info/(?P<course_id>\d+)/$', CourseInfoView.as_view(), name='course_info'),
    # 课程评论页
    url('^comment/(?P<course_id>\d+)/$', CourseCommentView.as_view(), name='course_comment'),
    # 对课程添加评论
    url('^add_comment/$', AddCommentView.as_view(), name='add_comment'),
    # 视频播放页面
    url('^video_play/(?P<video_id>\d+)$', VideoPlayView.as_view(), name='video_play'),
]