Exemple #1
0
from django.urls import re_path

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

__author__ = 'hzy'
__date__ = '2020/2/8 11:23'

app_name = 'organization'
urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name='org_list'),
    url(r'^add_ask/$', AddUserAskView.as_view(), name='add_ask'),
    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"),

    #机构收藏
    url('add_fav/$', AddFavView.as_view(), name="add_fav"),
    #讲师列表页
    url('teacher/list/$', TeacherListView.as_view(), name="teacher_list"),
    #讲师详情页
    re_path('teacher/detail/(?P<teacher_id>\d+)/$',
            TeacherDetailView.as_view(),
            name="teacher_detail"),
]
Exemple #2
0
from django.urls import path,include,re_path
from apps.organization.views import OrglistView,OrgDetailView,CourseDetailView,OrgDescView,OrgTeacherView

urlpatterns = [
    path('list/', OrglistView.as_view(),name="org-list"),
    re_path(r'org-home(?P<org_id>.*)/$',OrgDetailView.as_view(),name="org-home"),
    re_path(r'org-course(?P<org_id>.*)/$',CourseDetailView.as_view(),name="org-course"),
    re_path(r'org-desc(?P<org_id>.*)/$',OrgDescView.as_view(),name="org-desc"),
    re_path(r'org-teacher(?P<org_id>.*)/$',OrgTeacherView.as_view(),name="org-teacher"),
]
Exemple #3
0
from django.conf.urls import url
from django.urls import path
from apps.organization.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgDescView, OrgCourseView

urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name='list'),
    url(r'^add_ask/$', AddAskView.as_view(), name='add_ask'),
    url(r'~(?P<org_id>\d+)/$', OrgHomeView.as_view(), name="home"),
    url(r'~(?P<org_id>\d+)/teacher$', OrgTeacherView.as_view(),
        name="teacher"),
    url(r'~(?P<org_id>\d+)/desc$', OrgDescView.as_view(), name="desc"),
    url(r'~(?P<org_id>\d+)/course$', OrgCourseView.as_view(), name="course"),
]
Exemple #4
0
# -*- coding: utf-8 -*-
from django.urls import path,include,re_path
from apps.organization.views import OrgView,AddUserAskView,OrgHomeView,OrgCourseView,OrgDescView,OrgTeacherView,AddFavView

urlpatterns = [
    #课程机构列表页
    path(r'list/', OrgView.as_view(), name='org_list'),
    path(r'add_ask/', AddUserAskView.as_view(), name='add_ask'),
    re_path(r'home/(?P<org_id>\d+)/',OrgHomeView.as_view(),name ='org_home'),
    re_path(r'course/(?P<org_id>\d+)/',OrgCourseView.as_view(),name ='org_course'),
    re_path(r'desc/(?P<org_id>\d+)/', OrgDescView.as_view(), name='org_desc'),
    re_path(r'teacher/(?P<org_id>\d+)/', OrgTeacherView.as_view(), name='org_teacher'),
    path(r'add_fav/', AddFavView.as_view(), name='add_fav'),

]
Exemple #5
0
# -*- coding: utf-8 -*-
# @Time       :   2021-05-03 12:21
# @Author     :   XrazYang
# @File       :   urls.py
# @Project    :   emooc

from django.urls import path
from django.conf.urls import url
from apps.organization.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, \
    TeacherListView, TeacherDetailView

urlpatterns = [
    # path('org_list/', OrgView.as_view(), name='org_list'),
    url(r'^list/$', OrgView.as_view(), name='list'),
    url(r'^add_ask/$', AddAskView.as_view(), name='add_ask'),
    url(r'^(?P<org_id>\d+)/$', OrgHomeView.as_view(), name='org_home'),
    url(r'^(?P<org_id>\d+)/teacher/$', OrgTeacherView.as_view(), name='org_teacher'),
    url(r'^(?P<org_id>\d+)/course/$', OrgCourseView.as_view(), name='org_course'),
    url(r'^(?P<org_id>\d+)/desc/$', OrgDescView.as_view(), name='org_desc'),

    url(r'^teachers/$', TeacherListView.as_view(), name='teachers'),
    url(r'^teachers/(?P<teacher_id>\d+)/$', TeacherDetailView.as_view(), name='teacher_detail'),
    # path('<int:org_id>/', OrgHomeView.as_view(), name='org_home'),
]