Exemplo n.º 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"),
]
Exemplo n.º 2
0
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"),
]
Exemplo n.º 3
0
from django.conf.urls import url
from apps.organizations.views import OrgView, AddAsk, TeacherListView, TeacherDeatailView

urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name='list'),
    url(r'^add_ask/$', AddAsk.as_view(), name='add_ask'),
    # 讲师相关
    url(r'^teachers/$', TeacherListView.as_view(), name='teachers'),
    url(r'^teachers/(?P<teacher_id>\d+)$',
        TeacherDeatailView.as_view(),
        name='teacher_detail'),
]
Exemplo n.º 4
0
from django.conf.urls import url

from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, \
    TeacherListView, TeacherDetailView, OpenYVIP, OpenNVIP, SubmitVIP

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+)/$', OrgCourseView.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'^vip/$', TeacherListView.as_view(), name="vip"),
    url(r'^nvip/$', OpenNVIP.as_view(), name="nvip"),
    url(r'^yvip/$', OpenYVIP.as_view(), name="yvip"),
    url(r'^submit_vip/$', SubmitVIP.as_view(), name="submit_vip"),
    url(r'^teachers/(?P<teacher_id>\d+)/$',
        TeacherDetailView.as_view(),
        name="teacher_detail"),
]
Exemplo n.º 5
0
from django.urls import path
from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, TeacherListView, TeacherDetailView
app_name = 'org'
urlpatterns = [
    #机构相关也main
    path('list/', OrgView.as_view(), name='list'),
    path('add_ask/', AddAskView.as_view(), name='add_ask'),
    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/', TeacherListView.as_view(), name='teachers'),
    path('teachers/<int:teacher_id>/',
         TeacherDetailView.as_view(),
         name='teacher_detail'),
]
Exemplo n.º 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'),
]