コード例 #1
0
ファイル: urls.py プロジェクト: bravobest/mx_online
# encoding: utf-8
__author__ = 'shawn'
__date__ = '2017/11/7 20:30'

from django.conf.urls import url
from organization.views import OrgListView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, UserAskView, AddFavView

urlpatterns = [
    # 课程机构 organization
    url(r'^list/$', OrgListView.as_view(), name='org_list'),
    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'^teacher/(?P<org_id>\d+)/$',
        OrgTeacherView.as_view(),
        name='org_teacher'),
    url(r'^user_ask/$', UserAskView.as_view(), name='user_ask'),
    # 机构的收藏
    url(r'^add_fav/$', AddFavView.as_view(), name='add_fav')
]
コード例 #2
0
ファイル: urls.py プロジェクト: zhaoxinyu666/jiaoyupingtai
# organization/urls.py

from organization.views import OrgView,AddUserAskView,OrgHomeView,OrgCourseView,OrgDescView,OrgTeacherView,AddFavView

from django.urls import path,re_path


# 要写上app的名字
app_name = "organization"

urlpatterns = [
    path('list/',OrgView.as_view(),name='org_list'),
    path('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('teacher/(?P<org_id>\d+)/', OrgTeacherView.as_view(), name="org_teacher"),#.机构讲师
    path('add_fav/', AddFavView.as_view(), name="add_fav"),#课程机构收藏功能
]
コード例 #3
0
ファイル: urls.py プロジェクト: liushixin0227/TeachingOnline
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/9/7 0007 11:52
# @Author  : Liushixin
# @Site    :
# @File    : urls.py
# @Software: PyCharm
from django.conf.urls import url

from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescribeView, OrgTeacherView, \
    AddFavView

urlpatterns = [
    url('^list/$', OrgView.as_view(), name='orglist'),
    url('^add_ask/$', AddUserAskView.as_view(), name='add_ask'),
    url('^home/(?P<org_id>\d+)', OrgHomeView.as_view(), name='org_home'),
    url('^course/(?P<org_id>\d+)', OrgCourseView.as_view(), name='org_course'),
    url('^describe/(?P<org_id>\d+)',
        OrgDescribeView.as_view(),
        name='org_describe'),
    url('^teacher/(?P<org_id>\d+)',
        OrgTeacherView.as_view(),
        name='org_teacher'),
    url('^add_fav/$', AddFavView.as_view(), name='add_fav')
]
コード例 #4
0
ファイル: urls.py プロジェクト: zhangxiangqiang/rep1_mxonline
# _*_ coding:utf-8 _*_
from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, \
    AddFvaView, TeacherListView, TeacherDetailView

__author__ = 'qing'
__date__ = '2017/8/7 11:43'
from django.conf.urls import url, include

urlpatterns = [
    url(r'^list/$', OrgView.as_view(), name="org_list"),
    url(r'^add_ask/$', AddUserAskView.as_view(), name="add_ask"),
    url(r'^home/(?P<course_org_id>\d+)/$', OrgHomeView.as_view(), name="org_home"),
    url(r'^course/(?P<course_org_id>\d+)/$', OrgCourseView.as_view(), name="org_course"),
    url(r'^desc/(?P<course_org_id>\d+)/$', OrgDescView.as_view(), name="org_desc"),
    url(r'^org_teacher/(?P<course_org_id>\d+)/$', OrgTeacherView.as_view(), name="org_teacher"),
#     收藏与取消
    url(r'^add_fav/$', AddFvaView.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"),



]
コード例 #5
0
#! /usr/bin/env python
# -*- coding: UTF-8 -*-

# Copyright(C), 2019, Zhang Chengwei.
#
# Author:       zhang
# DATE:         2019/5/26 12:50
# IDE_NAME:     PyCharm
# Filename:     urls.py
# Version:      1.0.0
# Description:
# History:

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

urlpatterns = [
    path('list/', OrgView.as_view(), name='org_list'),
    path('add_ask/', AddAskView.as_view(), name='add_ask'),
    path('<int:org_id>/home/', OrgHomeView.as_view(), name='org_home'),
    path('<int:org_id>/course/', OrgCourseView.as_view(), name='org_course'),
    path('<int:org_id>/desc/', OrgDescView.as_view(), name='org_desc'),
    path('<int:org_id>/teacher/', OrgTeacherView.as_view(),
         name='org_teacher'),
    path('teachers/', TeacherListView.as_view(), name='teacher_list'),
    path('teacher/<int:teacher_id>/detail',
         TeacherDetailView.as_view(),
         name='teacher_detail'),
    path('collect/', AddCollectView.as_view(), name='add_fav')
]
コード例 #6
0
    path('user/',include('usertest.urls',namespace='user')),
    path('',IndexView.as_view(),name='index'),
    path('login/',LoginView.as_view(),name='login'),
    path('logout/',userlogout,name='logout'),
    path('register/',RegisterView.as_view(),name='register'),
    path('forget/',ForgetView.as_view(),name='forget'),
    re_path('active/(\w+)/',ActiveUserView.as_view()),
    re_path('reset/(\w+)/',RestView.as_view()),
    #path('org_list/$',OrgView.as_view(),name='org_list'),
    re_path(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT }),
    re_path(r'org_list/(\d+)/$',OrgView.as_view(),name='org_list'),
    path('userask/',UserAskView.as_view(),name='userask'),
    #path('forumlink/',include('forumlink.urls',namespace='forumlink')),
    #两种方式的url,对应到view中的参数是不一样的。正则方式在view中需要通过参数的方式
    #获取,有两种方式
    #一:函数形式参数传递:
    #def get(request,id)
    #二:通过arg获取 arg【0】
    #url中定义了参数id,view中必须对应到,具体参考代码示例。
    #re_path('orghome/(\d+)/',OrgHomeView.as_view(),name='orghome'),
    path('orghome/<str:id>/', OrgHomeDetail.as_view(), name='orghome'),

    re_path('orgcourse/(\d+)/',OrgCourseView.as_view(),name='orgcourse'),
    path('orgdetail/<int:pk>/',OrgDetailView.as_view(),name='orgdetail'),
    path('orgteacher/<int:id>/',OrgTeacherView.as_view(),name='orgteacher'),
    path('userfav/',UserFavView.as_view(),name='userfav'),
    path('course/',include('course.urls',namespace='course')),
    path('teacher/',include('organization.urls',namespace='teacher')),
    path('users/',include('users.urls',namespace='users')),
]
コード例 #7
0
# coding=utf-8
from django.conf.urls import url, include

from organization.views import OrgListView
from organization.views import AddUserAskView
from organization.views import OrgHomeView
from organization.views import OrgCourseView
from organization.views import OrgTeacherView
from organization.views import OrgDescView
from organization.views import AddFavView

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='home'),
    url(r'course/(?P<org_id>\d+)/$', OrgCourseView.as_view(), name='course'),
    url(r'teacher/(?P<org_id>\d+)/$', OrgTeacherView.as_view(),
        name='teacher'),
    url(r'desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name='desc'),
    # 机构收藏
    url(r'^add_fav/$', AddFavView.as_view(), name='add_fav'),
]
コード例 #8
0
from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView,\
    AddFavView, TeacherListView, TeacherDetailView

app_name = "organization"

urlpatterns = [

    # 课程机构列表url
    url(r'^list/', OrgView.as_view(), name="org_list"),
    # 添加我要学习
    url(r'^add_ask/', AddUserAskView.as_view(), name="add_ask"),
    # home页面,取纯数字
    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"),
コード例 #9
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from django.urls import path, re_path

from organization.views import OrgListView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, AddFavView

app_name = 'organization'

urlpatterns = [
    # 课程机构列表url
    path('list/', OrgListView.as_view(), name="org_list"),
    path('add_ask/', AddUserAskView.as_view(), name='add_ask'),
    re_path('home/(?P<org_id>\d+)/', OrgHomeView.as_view(), name='org_home'),  # 机构详情首页
    re_path('id/(?P<org_id>\d+)/courses/', OrgCourseView.as_view(), name='org_course'),  # 机构课程列表
    re_path('id/(?P<org_id>\d+)/desc/', OrgDescView.as_view(), name='org_desc'),  # 机构介绍
    re_path('id/(?P<org_id>\d+)/teacher/', OrgTeacherView.as_view(), name='org_teacher'),  # 机构讲师
    path('add_fav/', AddFavView.as_view(), name="add_fav"),  # 添加机构收藏
]
コード例 #10
0
from django.urls import path
from django.conf.urls import url

from organization.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, \
    TeacherListView, TeacherDetailView

urlpatterns = [
    path(r'list/', OrgView.as_view(), name="list"),
    path(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"),
]
コード例 #11
0
ファイル: urls.py プロジェクト: dakajianshen/Mxonline
from django.conf.urls import url

from organization.views import OrgView,AddAskView,OrgHomeView,OrgCourseView,OrgDescView,OrgTeachersView,AddFavView
from organization.views import TeacherListView,TeacherDetail
urlpatterns = [
    url(r'^list/$',OrgView.as_view(), name='org_list'),
    url(r'^add_ask/$',AddAskView.as_view(),name='add_ask'),
    url(r'^home/(?P<course_id>\d+)/$',OrgHomeView.as_view(),name='org_home'),
    url(r'^course/(?P<course_id>\d+)/$', OrgCourseView.as_view(), name='org_course'),
    url(r'^desc/(?P<course_id>\d+)/$', OrgDescView.as_view(), name='org_desc'),
    url(r'^teachers/(?P<course_id>\d+)/$', OrgTeachersView.as_view(), name='org_teachers'),
    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+)/$',TeacherDetail.as_view(),name='teacher_detail')

]
コード例 #12
0
ファイル: urls.py プロジェクト: sloth-zpz/Mxonline3
app_name = "organization"

urlpatterns = [

    # 课程机构列表url
    path('list/', OrgView.as_view(), name="org_list"),

    # 添加我要学习
    path('add_ask/', AddUserAskView.as_view(), name="add_ask"),

    # home页面,取纯数字
    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"),

    # 机构收藏
    path('add_fav/', AddFavView.as_view(), name="add_fav"),

    # 讲师列表
    path('teacher/list/', TeacherListView.as_view(), name="teacher_list"),

    # 访问机构讲师
    re_path('teacher/detail/(?P<teacher_id>\d+)/', TeacherDetailView.as_view(), name="teacher_detail"),