Ejemplo n.º 1
0
app_name = "organization"

urlpatterns = [

    # 课程机构列表url
    path('list/', OrgView.as_view(), name="org_list"),

    # 添加我要学习
    path('add_ask/', AddUserAskView.as_view(), name="add_ask"),

    # home页面,取纯数字
    re_path('home/(?P<org_id>\d+)/', OrgHomeView.as_view(), name="org_home"),

    # 访问课程
    re_path('course/(?P<org_id>\d+)/',
            OrgCourseView.as_view(),
            name="org_course"),

    # 访问机构描述
    re_path('desc/(?P<org_id>\d+)/', OrgDescView.as_view(), name="org_desc"),

    # 访问机构讲师
    re_path('org_teacher/(?P<org_id>\d+)/',
            OrgTeacherView.as_view(),
            name="org_teacher"),

    # 机构收藏
    path('add_fav/', AddFavView.as_view(), name="add_fav"),

    # 讲师列表
    path('teacher/list/', TeacherListView.as_view(), name="teacher_list"),
Ejemplo n.º 2
0
from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, AddFavView, TeacherListView, TeacherDeatailView
from django.urls import path, re_path

app_name = 'org'
urlpatterns = [
    path('list/', OrgView.as_view(), name='org_list'),
    path('add_ask/', AddUserAskView.as_view(), name='add_ask'),
    path('add_fav/', AddFavView.as_view(), name='add_fav'),
    path('teacher/', TeacherListView.as_view(), name='teacher_list'),
    re_path('home/(?P<org_id>\d+)/', OrgHomeView.as_view(), name='org_home'),
    re_path('course/(?P<org_id>\d+)/', OrgCourseView.as_view(), name='org_course'),
    re_path('desc/(?P<org_id>\d+)/', OrgDescView.as_view(), name='org_desc'),
    re_path('teacher/(?P<org_id>\d+)/', OrgTeacherView.as_view(), name='org_teacher'),
    re_path('teacher/detail/(?P<teacher_id>\d+)/', TeacherDeatailView.as_view(), name='teacher_detail'),

]
Ejemplo n.º 3
0
    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, include

from organization.views import OrgListView, AskTaskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, AddFavView, TeacherListView, TeacherDetailView
from django.views.static import serve
from untitled12.settings import MEDIA_ROOT

urlpatterns = [
    url(r'^org_list/$', OrgListView.as_view(), name="org_list"),
    url(r'^ask_task/$', AskTaskView.as_view(), name="ask_task"),
    url(r'^home/(?P<org_id>\d+)/$', OrgHomeView.as_view(), name="org_home"),
    url(r'^course/(?P<org_id>\d+)/$', OrgCourseView.as_view(), name="course"),
    url(r'^desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name='org_desc'),
    url(r'^org_teacher/(?P<org_id>\d+)/$',
        OrgTeacherView.as_view(),
        name='org_teacher'),
    url(r'^add_fav/$', AddFavView.as_view(), name='add_fav'),

    # 讲师列表页
    url(r'^teacher/list/$', TeacherListView.as_view(), name='teacher_list'),

    # 讲师详情页
    url(r'^teacher/detail/(?P<teacher_id>\d+)/$',
        TeacherDetailView.as_view(),
        name='teacher_detail'),
]
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-

from django.conf.urls import url, include

from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, TeacherDetailView
from organization.views import OrgDescView, OrgTeacherView, AddFavView, TeacherListView

urlpatterns = [
    # 课程机构列表页
    url('^list/$', OrgView.as_view(), name='org_list'),
    # 用户咨询
    url('^add_ask/$', AddUserAskView.as_view(), name='add_ask'),
    # 机构首页
    url('^home/(?P<org_id>\d+)/$', OrgHomeView.as_view(), name='org_home'),
    # 机构课程列表页
    url('^course/(?P<org_id>\d+)/$', OrgCourseView.as_view(), name='course'),
    # 机构介绍
    url('^desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name='desc'),
    # 机构教师
    url('^org_teacher/(?P<org_id>\d+)/$',
        OrgTeacherView.as_view(),
        name='org_teacher'),
    # 机构收藏
    url('^add_fav/$', AddFavView.as_view(), name='add_fav'),

    # 课程讲师列表
    url('^teacher/list/$', TeacherListView.as_view(), name='teacher_list'),
    # 课程讲师详情
    url('^teacher/detail/(?P<teacher_id>\d+)/$',
        TeacherDetailView.as_view(),
        name='teacher_detail')
Ejemplo n.º 5
0
app_name = "organization"

urlpatterns = [

    # 课程机构列表url
    path('list/', OrgView.as_view(), name="org_list"),

    # 添加我要学习
    path('add_ask/', AddUserAskView.as_view(), name="add_ask"),

    # home页面,取纯数字
    re_path('home/(?P<org_id>\d+)/', OrgHomeView.as_view(), name="org_home"),

    # 访问课程
    re_path('course/(?P<org_id>\d+)/', OrgCourseView.as_view(), name="org_course"),

    # 访问机构描述
    re_path('desc/(?P<org_id>\d+)/', OrgDescView.as_view(), name="org_desc"),

    # 访问机构讲师
    re_path('org_teacher/(?P<org_id>\d+)/', OrgTeacherView.as_view(), name="org_teacher"),

    # 机构收藏
    path('add_fav/', AddFavView.as_view(), name="add_fav"),

    # 讲师列表
    path('teacher/list/', TeacherListView.as_view(), name="teacher_list"),

    # 访问机构讲师
    re_path('teacher/detail/(?P<teacher_id>\d+)/', TeacherDetailView.as_view(), name="teacher_detail"),