예제 #1
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'),
]
예제 #2
0
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"),
    # 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+)/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<org_id>\d+)/$',
        TeacherDetailView.as_view(),
        name="teacher_detail"),
]
예제 #3
0
from django.conf.urls import url

from apps.organizations.views import (
    Org_View,
    AddAskView,
    OrgHomeView,
    OrgTeacherView,
    OrgCourseView,
    OrgDescView,
    TeacherView,
    TeacherDetailView,
)

urlpatterns = [
    url(r'^list/$', Org_View.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'^teacher/$', TeacherView.as_view(), name='teacher'),
    url(r'^(?P<teacher_id>\d+)/detail/$',
        TeacherDetailView.as_view(),
        name='detail'),
]
예제 #4
0
from django.conf.urls import url
from apps.organizations.views import AddAskView, OrgViews, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView
from apps.organizations.views import TeacherListView, TeacherDetailView
from django.views.decorators.csrf import csrf_exempt

urlpatterns = [
    url(r'^list/$', OrgViews.as_view(), name='list'),
    url(r'^add_ask/$', csrf_exempt(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'),
]