示例#1
0
# -*- coding: utf-8 -*-
# @File : urls.py
# @Author :WeiSanJin
# @Time :2021/04/06 21:39
# @Site :https://github.com/WeiSanJin
from django.conf.urls import url

from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView
from apps.organizations.views import TeacherListView, TeacherDetailView

urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name="list"),
    url(r'^add_ask/$', AddAskView.as_view(), name="add_ask"),

    # path('<intt:org_id>/', OrgHomeView.as_view(), name="home")
    url(r'^(?P<org_id>\d+)/$', OrgHomeView.as_view(), name="home"),
    url(r'^teacher/(?P<org_id>\d+)/$', OrgTeacherView.as_view(), name="teacher"),
    url(r'^course/(?P<org_id>\d+)/$', OrgCourseView.as_view(), name="course"),
    url(r'^desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name="desc"),

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

    # 讲师详情页
    url(r'^teachers/(?P<teacher_id>\d+)/$', TeacherDetailView.as_view(), name="teacher_detail"),
]
示例#2
0
from django.conf.urls import url
from django.urls import path

from apps.organizations.views import OrgView, AddConsultView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, \
    TeacherView, TeacherDetailView

urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name="list"),
    url(r'^add_consult/', AddConsultView.as_view(), name="add_consult"),
    path('<int:org_id>/', OrgHomeView.as_view(), name="home"),
    path('<int:org_id>/teacher/', OrgTeacherView.as_view(), name="teacher"),
    path('<int:org_id>/course/', OrgCourseView.as_view(), name="course"),
    path('<int:org_id>/desc/', OrgDescView.as_view(), name="desc"),
    path('teachers/', TeacherView.as_view(), name="teacher-list"),
    path('teacher_list/<int:teacher_id>/',
         TeacherDetailView.as_view(),
         name="teacher-detail"),
]
from django.conf.urls import url
from apps.organizations.views import OrgView,AddAskView,OrgHomeView,OrgTeacherView,OrgCourseView,\
    OrgDescView,TeacherListView,TeacherDetailView
from django.urls import path, re_path

urlpatterns = [
    re_path('list/$', OrgView.as_view(), name="list"),
    re_path('add_ask/$', AddAskView.as_view(), name="add_ask"),
    re_path('^(?P<org_id>\d+)/$', OrgHomeView.as_view(), name="home"),
    re_path('^(?P<org_id>\d+)/teacher/$',
            OrgTeacherView.as_view(),
            name="teacher"),
    re_path('^(?P<org_id>\d+)/course/$',
            OrgCourseView.as_view(),
            name="course"),
    re_path('^(?P<org_id>\d+)/desc/$', OrgDescView.as_view(), name="desc"),
    re_path("^all_teachers/$", TeacherListView.as_view(), name="allteacher"),
    re_path("^teacher_detail/(?P<teacher_id>\d+)/$",
            TeacherDetailView.as_view(),
            name="teacherdetail"),
]
示例#4
0
文件: urls.py 项目: HIKOUTEI/MxOnline
from django.conf.urls import url

from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, TeacherListView, TeacherDetailView

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+)/course/$', OrgCourseView.as_view(), name='course'),
    url(r'^(?P<org_id>\d+)/desc/$', OrgDescView.as_view(), name='desc'),
    url(r'^teachers/$', TeacherListView.as_view(), name='teachers'),
    url(r'^teachers/(?P<teacher_id>\d+)/$',
        TeacherDetailView.as_view(),
        name='teacher_detail'),
]
示例#5
0
from django.conf.urls import url
from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgDescView, OrgCourseView, TeacherListView
from django.urls import include, path

urlpatterns = [
    #机构页面的url
    url(r"^list/$", OrgView.as_view(), name="list"),
    #咨询Url
    url(r"^add_ask/$", AddAskView.as_view(), name="add_ask"),
    #组织机构详细页面 路由一
    #url(r'^(?P<org_id>\d+)/$',OrgHomeView.as_view(),name = "home"),
    #组织机构详细页面 路由二
    path('<int:org_id>/', 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"),

    #讲师列表页面
    url(r'^teachers/$', TeacherListView.as_view(), name="teachers"),
]
示例#6
0
# _*_ coding:utf-8 _*_
from django.conf.urls import url

from apps.organizations.views import AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, \
    AddFavView, TeacherDetailView, TeacherListView, OrgListView

urlpatterns = [

    # 课程机构列表页
    url(r'^list/$', OrgListView.as_view(), name='org_list'),
    url(r'^add_ask/$', AddUserAskView.as_view(), name='add_ask'),
    url(r'^home/(?P<org_id>\d+)/$', OrgHomeView.as_view(), name='org_home'),
    url(r'^course/(?P<org_id>\d+)/$',
        OrgCourseView.as_view(),
        name='org_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'),
]