Ejemplo n.º 1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 开发人员   :Davis Niu
# 开发时间   :9/2/2020  8:20 AM
# 文件名称   :urls.py
from django.urls import re_path
from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView

urlpatterns = [
    re_path(r'^list/$', OrgView.as_view(), name='list'),
    re_path(r'^add_ask/$', AddAskView.as_view(), name='add_ask'),
    re_path(r'^(?P<org_id>\d+)/$', OrgHomeView.as_view(), name='home'),
    re_path(r'^(?P<org_id>\d+)/teacher/$',
            OrgTeacherView.as_view(),
            name='teacher'),
]
Ejemplo n.º 2
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"),
]
Ejemplo n.º 3
0
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"),
    # 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"),
    # # path('<int:org_id>/', OrgHomeView.as_view(), name="home"),
    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'),
    url(r'^teachers/(?P<teacher_id>\d+)/$',
        TeacherDetailView.as_view(),
        name="teacher_detail"),
    # url(r'^add_ask/$', AddAskView.as_view(), name='add_ask'),
]
Ejemplo n.º 4
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"),
]
Ejemplo n.º 5
0
from django.conf.urls import url

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

urlpatterns = [
    # 授课机构
    url(r'^list/$', OrgListView.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'),

]