Ejemplo n.º 1
0
from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns

from course.views import (
CategoryListView,
CategoryDetailView,
TeacherListView,
TeacherDetailView,
CourseListView,
CourseDetailView,
ProgramItemView
)

app_name = 'course'
urlpatterns = [
    path('categories/', CategoryListView.as_view(), name='category_list'),
    path('categories/<int:pk>/', CategoryDetailView.as_view(), name='category_detail'),

    path('teachers/', TeacherListView.as_view(), name='teacher_list'),
    path('teachers/<int:pk>/', TeacherDetailView.as_view(), name='teacher_detail'),

    path('courses/', CourseListView.as_view(), name='course_list'),
    path('courses/<int:pk>/', CourseDetailView.as_view(), name='course_detail'),

    path('programs/', ProgramItemView.as_view(), name='program_list'),
]

urlpatterns = format_suffix_patterns(urlpatterns)
Ejemplo n.º 2
0
"""tanzhou URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from course.views import CourseListView, CourseDetailView, LessonDetailView

urlpatterns = [
    # 全部课程信息
    url(r'list/$', CourseListView.as_view(), name='list'),
    # 课程详情
    url(r'details/(?P<course_id>.*)$',
        CourseDetailView.as_view(),
        name='details'),
    # 目录详情
    url(r'lesson/(?P<course_id>.*)$',
        LessonDetailView.as_view(),
        name='lesson'),
]
Ejemplo n.º 3
0
from django.conf.urls import url
from course.views import CourseListView, LessionsListView, ManageCourseListView
from rest_framework import generics
from course.views import Cate, Cam
urlpatterns = [
    url(r'^list/', CourseListView.as_view(), name="course_list"),
    url(r'^(?P<course_id>[0-9]+)/',
        LessionsListView.as_view(),
        name='course_detail'),
    url(r'^cate/', Cate.as_view()),
    #管理课程表
    url(r'^manage/', ManageCourseListView.as_view(), name='manage_course')
]
Ejemplo n.º 4
0
# along with Eskollz.  If not, see <http://www.gnu.org/licenses/>
###############################################################################

from course.views import CourseListView, CourseCreateView, CourseDetailView, \
    CourseUpdateView, CourseDeleteView, CourseConstraintCreateView, \
    CourseConstraintUpdateView, CourseConstraintDeleteView, \
    CourseEvalRefCreateView, CourseEvalRefUpdateView, CourseEvalRefDeleteView, \
    CourseConstraintDetailView, CourseEvalRefDetailView, \
    CourseGroupConstraintCreateView, CourseGroupConstraintDetailView, \
    CourseGroupConstraintUpdateView, CourseGroupConstraintDeleteView
from django.conf.urls import patterns, url

urlpatterns = patterns(
    '',
    url(r'^$',
        CourseListView.as_view(),
        name='course_list'),
    url(r'^_create/',
        CourseCreateView.as_view(),
        name='course_create'),
    url(r'^(?P<pkc>\d+)/$',
        CourseDetailView.as_view(),
        name='course_detail'),
    url(r'^(?P<pkc>\d+)/_update/$',
        CourseUpdateView.as_view(),
        name='course_update'),
    url(r'^(?P<pkc>\d+)/_delete/$',
        CourseDeleteView.as_view(),
        name='course_delete'),

# ## Course constraints
Ejemplo n.º 5
0
from django.urls import path

from course.views import (CourseListView, CourseDetailView, CourseCreateView,
                          CourseUpdateView, CourseDeleteView)

app_name = 'course'

urlpatterns = [
    path('', CourseListView.as_view(), name='list'),
    path('create/', CourseCreateView.as_view(), name='create'),
    path('<slug>/', CourseDetailView.as_view(), name='detail'),
    path('<slug>/update', CourseUpdateView.as_view(), name='update'),
    path('<slug>/delete', CourseDeleteView.as_view(), name='delete'),
]
Ejemplo n.º 6
0
from django.conf.urls import url

from course.views import VideoTimeView, CourseVideoView, AddReplyView, AddCommentView, CourseCommentView, CourseInfoView, CourseDetailView, \
    CourseListView

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'^comment/(?P<course_id>\d+)/$',
        CourseCommentView.as_view(),
        name='course_comment'),
    url(r'^add_comment/$', AddCommentView.as_view(), name='add_comment'),
    url(r'^add_reply/$', AddReplyView.as_view(), name='add_reply'),
    url(r'^video/(?P<video_id>\d+)/$',
        CourseVideoView.as_view(),
        name='course_video'),
    url(r'^video/time/$', VideoTimeView.as_view(), name='video_time'),
]
Ejemplo n.º 7
0
"""localized URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path, include

from rest_framework import routers # Import the router
from course.views import CourseListView

router = routers.DefaultRouter()  # Define the router with our view


urlpatterns = [
    path('', include(router.urls)), # Add the view to the patterns
    path('api/courses/', CourseListView.as_view())
]
Ejemplo n.º 8
0
from django.urls import include, path
from course.views import CourseListView, CourseUpdateView, CourseDeleteView, TopicListView, \
    TopicCreateView, TopicUpdateView, TopicDeleteView
from instructor.views import QuizListView, QuizCreateView, QuizUpdateView, QuizDeleteView, QuizResultsView, \
    question_add, question_change, QuestionDeleteView, CourseDetailView

urlpatterns = [
    # path('', classroom.home, name='home'),
    path('instructor/', include(([
        path('', CourseListView.as_view(), name='course_change_list'),
        path('course/<int:pk>/', CourseUpdateView.as_view(), name='course_change'),
        path('course/<int:pk>/delete/', CourseDeleteView.as_view(), name='course_delete'),
        path('coursedetail/<int:course_pk>/', CourseDetailView.as_view(), name='course_detail'),

        path('topic', TopicListView.as_view(), name='topic_change_list'),
        path('topic/add/<int:course_pk>/', TopicCreateView.as_view(), name='topic_add'),
        path('topic/<int:pk>/', TopicUpdateView.as_view(), name='topic_change'),
        path('topic/<int:pk>/delete/', TopicDeleteView.as_view(), name='topic_delete'),

        path('quiz', QuizListView.as_view(), name='quiz_change_list'),
        path('quiz/add/<int:course_pk>/', QuizCreateView.as_view(), name='quiz_add'),
        # path('quiz/add/<int:course_pk>/', quizcreate, name='quiz_add'),
        path('quiz/<int:pk>/', QuizUpdateView.as_view(), name='quiz_change'),
        path('quiz/<int:pk>/delete/', QuizDeleteView.as_view(), name='quiz_delete'),
        path('quiz/<int:pk>/results/', QuizResultsView.as_view(), name='quiz_results'),
        path('quiz/<int:pk>/question/add/', question_add, name='question_add'),
        path('quiz/<int:quiz_pk>/question/<int:question_pk>/', question_change, name='question_change'),
        path('quiz/<int:quiz_pk>/question/<int:question_pk>/delete/', QuestionDeleteView.as_view(), name='question_delete'),
    ], 'instructor'), namespace='instructor')),
]
Ejemplo n.º 9
0
from django.urls import path

from course.views import CourseListView, CourseDetailView

urlpatterns = [
    path("", CourseListView.as_view()),
    path("<slug:slug>/", CourseDetailView.as_view())
]
Ejemplo n.º 10
0
from django.conf.urls import url
from django.views.generic import TemplateView
from course.views import AboutView,CourseListView,ManageCourseListView,CreateCourseView,DeleteCourseView,CreateLessonView,ListLessonsView,DetailLessonView,StudentListLessonView
urlpatterns = [
    url(r'about/$', AboutView.as_view(), name="about"),
    url(r'course-list/$', CourseListView.as_view(), name="course_list"),
    url(r'manage-course/$', ManageCourseListView.as_view(), name="manage_course"),
    url(r'create-course/$', CreateCourseView.as_view(), name="create_course"),
    url(r'delete-course/(?P<pk>\d+)/$', DeleteCourseView.as_view(), name="delete_course"),
    url(r'create-lesson/$', CreateLessonView.as_view(), name="create_lesson"),
    url(r'list-lessons/(?P<course_id>\d+)/$', ListLessonsView.as_view(), name="list_lessons"),
    url(r'detail-lesson/(?P<lesson_id>\d+)/$', DetailLessonView.as_view(), name="detail_lesson"),
    url(r'lessons-list/(?P<course_id>\d+)/$', StudentListLessonView.as_view(), name="lessons_list"),

]
Ejemplo n.º 11
0
Archivo: urls.py Proyecto: szouc/mysite
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib import admin

from course.views import CourseListView
from course.api import urls as course_api_urls
from students.api import urls as student_api_urls
from account.api import urls as account_api_urls


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/', include(account_api_urls)),
    url(r'^api/subject/', include(course_api_urls)),
    url(r'^api/student/', include(student_api_urls)),
    url(r'^auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
    url(r'^course/', include('course.urls')),
    url(r'^$', CourseListView.as_view(), name='course_list'),
    url(r'^students/', include('students.urls')),
    url(r'^account/', include('account.urls')),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
]

urlpatterns += static(settings.MEDIA_URL,
                      document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls)),]
Ejemplo n.º 12
0
"""university URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from course.views import CourseListView, LessonListView

urlpatterns = [
    path('', CourseListView.as_view(), name='home'),
    path('admin/', admin.site.urls),
    path('course/', include('course.urls')),
    path('time-table/', LessonListView.as_view(), name='time_table'),
    path('django-rq/', include('django_rq.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
]
Ejemplo n.º 13
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
from django.contrib.auth.views import login

from course.views import dblogout, index, course_profile
from course.views import OpenCourseListView, OpenCourseAdvancedSearchListView, CourseListView

from student import urls
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', index, name='index'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^login/',login,{'template_name':'login.tpl'},name="login"),
    url(r'^logout/$',dblogout,name="logout"),
    url(r'^admin/', include(admin.site.urls)),

    url(r'^course/$',CourseListView.as_view()),
    url(r'^open_course/$',OpenCourseListView.as_view(),name="open_course_list"),
    url(r'^open_course/advanced_search$',OpenCourseAdvancedSearchListView.as_view(),name="open_course_advanced_search"),
    url(r'^open_course/(\d+)/', course_profile, name="opencourse_profile"),

    url(r'^student/',include('student.urls')),
    url(r'^teacher/', include('teacher.urls')),
)
Ejemplo n.º 14
0
# -*- coding: utf-8 -*-
"""
@Time    : 18-11-6 下午2:03
@Author  : TX
@File    : urls.py
@Software: PyCharm
"""
from django.urls import path, re_path

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

# 要写上app的名字
app_name = 'course'

urlpatterns = [
    path('list/', CourseListView.as_view(), name='course_list'),  # 课程列表
    re_path('course/(?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('comment/(?P<course_id>\d+)/',
            CommentsView.as_view(),
            name="course_comments"),  # 课程评论
    path('add_comment/', AddCommentsView.as_view(),
         name="add_comment"),  # 添加课程评论
    path('video/(?P<video_id>\d+)/',
         VideoPlayView.as_view(),
         name="video_play"),  # 课程视频播放页
]