Exemplo n.º 1
0
    # 注册url
    path("register/", RegisterView.as_view(), name="register"),

    # 验证码url
    path("captcha/", include('captcha.urls')),
    # 激活用户url
    re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name="user_active"),
    # 找回密码url
    path("forget/", ForgetPwdView.as_view(), name="forget_pwd"),

    # 密码重置url
    re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name="reset_pwd"),

    # 修改密码url
    path("modify/", ModifyPwdView.as_view(), name="modify_pwd"),

    # 课程机构应用path配置
    path("org/", include('organization.urls', namespace="org")),

    # 配置文件上传的访问处理url
    re_path('media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),

    # # 配置静态文件上传的访问处理url
    # re_path('static/(?P<path>.*)', serve, {"document_root": STATIC_ROOT}),


    # 课程相关应用path配置
    path("course/", include('courses.urls', namespace="course")),

    # 用户个人中心应用path配置
Exemplo n.º 2
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
import xadmin

from users.views import LoginView, RegisterView, ActiveUserView, LogoutView, RefereeView, ForgetPwdView, ResetView, ModifyPwdView, IndexView
from goods.views import GoodsView, SuccessView
from orders.views import OrdersView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^admin/', xadmin.site.urls),
    url(r'^login/', LoginView.as_view(), name='login'),
    url(r'^logout/', LogoutView.as_view(), name='logout'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^register/', RegisterView.as_view(), name='register'),
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name='user_active'),
    url(r'^goods/', GoodsView.as_view(), name='goods'),
    url(r'^success/', SuccessView.as_view(), name='success'),
    url(r'^home/', OrdersView.as_view(), name='home'),
    url(r'^referee/', RefereeView.as_view(), name='referee'),
    url(r'^forget/', ForgetPwdView.as_view(), name='forget'),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name='reset_pwd'),
    url(r'^reset/$', ModifyPwdView.as_view(), name='reset'),
]
Exemplo n.º 3
0
    path("register/", RegisterView.as_view(), name = "register" ),

    # 验证码url
    path("captcha/", include('captcha.urls')),

    # 激活用户url
    re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name= "user_active"),

    # 忘记密码
    path('forget/', ForgetPwdView.as_view(), name= "forget_pwd"),

    # 重置密码urlc :用来接收来自邮箱的重置链接
    re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name="reset_pwd"),

    # 修改密码url; 用于passwordreset页面提交表单
    path('modify_pwd/', ModifyPwdView.as_view(), name="modify_pwd"),

    # 课程机构app的url配置,讲师的也在里面
    path("org/", include('organization.urls', namespace='org')),
    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    re_path('media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT }),
    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    # re_path('static/(?P<path>.*)', serve, {"document_root": STATIC_ROOT}),
    # 课程app的url配置
    path("course/", include('courses.urls', namespace="course")),
    # user app的url配置
    path("users/", include('users.urls', namespace="users")),

    # 富文本相关url
    path('ueditor/', include('DjangoUeditor.urls')),
]
Exemplo n.º 4
0
    re_path(r'^logout/$', LogoutView.as_view(), name='logout'),
    re_path(r'^register/$', RegisterView.as_view(), name='register'),
    re_path(r'^forget/$', ForgetPwdView.as_view(), name='forget'),

    # captcha库
    re_path(r'^captcha/', include('captcha.urls')),

    # 邮箱激活验证链接
    re_path(r'^active/(?P<active_code>.*)/$',
            ActiveUserView.as_view(),
            name='user_active'),
    re_path(r'^reset/(?P<reset_code>.*)/$',
            ResetView.as_view(),
            name='user_reset'),
    # re_path(r'^update_email/(?P<reset_code>.*)/$', ResetView.as_view(), name='user_reset'),
    re_path(r'^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'),

    # 讲师url
    re_path(r'^teacher/', include('Organization.urls')),

    # 课程机构url
    re_path(r'^org_list/', include('Organization.urls')),

    # 配置上传文件访问处理
    re_path(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
    # re_path(r'^static/(?P<path>.*)$', serve, {'document_root': STATIC_ROOT}),

    # 公开课首页
    re_path(r'^course_list/', include('Courses.urls')),

    # 个人中心
Exemplo n.º 5
0
from django.views.static import serve
import xadmin
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, LogoutView, IndexView
from muke.settings import MEDIA_ROOT, STATIC_ROOT

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='register'),
    path('captcha/', include('captcha.urls')),
    re_path('active/(?P<active_code>\w+.*)/', ActiveUserView.as_view(), name="user_active"),
    path('forget/', ForgetPwdView.as_view(), name='forget_pwd'),
    re_path('reset/(?P<active_code>\w+.*)/', ResetView.as_view(), name="reset_pwd"),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),

    # 课程机构url配置
    path('org/', include('organization.urls', namespace='org')),

    # 课程url配置
    path('course/', include('courses.urls', namespace='course')),

    # 用户url配置
    path('users/', include('users.urls', namespace='users')),

    # 配置上传文件的访问处理函数
    re_path('media/(?P<path>.*)', serve, {"document_root":MEDIA_ROOT}),

    # 配置静态文件的访问处理函数
    re_path('static/(?P<path>.*)', serve, {"document_root":STATIC_ROOT}),
Exemplo n.º 6
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
import xadmin
from django.views.static import serve

from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView
from organization.views import OrgView
from mxonline.settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url('^$', TemplateView.as_view(template_name='index.html'), name='index'),
    url('^login/$', LoginView.as_view(), name='login'),
    url('^register', RegisterView.as_view(), name='register'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name='user_active'),
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name='reset_pwd'),
    url(r'^modifypwd/$', ModifyPwdView.as_view(), name='modify_pwd'),
    url(r'^org/', include('organization.urls', namespace='org')),
    url(r'^media/(?P<path>.*)', serve, {'document_root': MEDIA_ROOT}),
    url(r'^course/', include('courses.urls', namespace='course')),
    url(r'^users/', include('users.urls', namespace='users')),
]
Exemplo n.º 7
0
urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),


    # 用户
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='register'),
    # path('login/', views.user_login, name='login'),
    path('captcha/', include('captcha.urls')),
    re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name='user_active'),
    path('forget/',ForgetPwdView.as_view(), name='forget_pwd'),
    re_path(r'reset/(?P<active_code>.*)/', ResetView.as_view(), name='reset_pwd'),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),

    # 个人信息
    path("users/", include('users.urls', namespace="users")),

    # 课程
    path("course/", include('course.urls', namespace="course")),

    # 机构
    path("org/", include('organization.urls', namespace="org")),
    # path('org_list/', OrgView.as_view(), name='org_list'),
    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    re_path(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),

    # 静态文件
    # re_path(r'^static/(?P<path>.*)', serve, {"document_root": STATIC_ROOT }),
Exemplo n.º 8
0
from django.conf.urls import url,include
from django.views.static import serve
import xadmin
from django.contrib import admin

from users.views import IndexView,LoginView,RegisterView,LogoutView,ActiveUserView,ForgetPwdView,ResetPwdView,ModifyPwdView
from .settings import MEDIA_ROOT, STATIC_ROOT
from operation.views import BoardView,SearchView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^$', IndexView.as_view(),name='index'),
    url(r'^board/$', BoardView.as_view(), name='board'),
    url(r'^search/$', SearchView.as_view(), name='search'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^tinymce/', include('tinymce.urls')),#富文本编辑框
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(),name='user_active'),
    url(r'^forgetpwd/$', ForgetPwdView.as_view(),name='forget_pwd'),
    url(r'^reset/(?P<reset_code>.*)/$', ResetPwdView.as_view(),name='reset_pwd'),
    url(r'^modifypwd/$',ModifyPwdView.as_view(),name='modify_pwd'),
    url(r'^board/$', ModifyPwdView.as_view(), name='msg_board'),
    url(r'^video/', include('videos.urls',namespace='video')),
    url(r'^user/', include('users.urls', namespace='user')),
    url(r'^media/(?P<path>.*)/$', serve, {'document_root':MEDIA_ROOT}),
    url(r'^static/(?P<path>.*)/$', serve, {'document_root': STATIC_ROOT}),
]
Exemplo n.º 9
0
    LogoutView, IndexView

import xadmin
from .settings import MEDIA_ROOT

urlpatterns = [
    path(r'xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='register'),
    path('captcha/', include('captcha.urls')),
    re_path(r'active/(?P<active_code>.+)/',
            UserActiveView.as_view(),
            name='user_active'),
    re_path(r'reset/(?P<reset_code>.+)/',
            UserPwdResetView.as_view(),
            name='password_reset'),
    path('forgetpwd/', ForgetPwdView.as_view(), name='forget_pwd'),
    path('modifypwd/', ModifyPwdView.as_view(), name='modify_password'),
    re_path(r'media/(?P<path>.*)', serve, {'document_root': MEDIA_ROOT}),
    path('org/', include('organization.urls')),
    path('course/', include('courses.urls')),
    path('user/', include('users.urls')),
    path('ueditor/', include('DjangoUeditor.urls')),
]
# urlpatterns.append(path('ueditor/', include('DjangoUeditor.urls')))

handler404 = 'users.views.page_not_found'
handler500 = 'users.views.page_error'
Exemplo n.º 10
0
from django.views.static import serve
from .settings import MEDIA_ROOT
import xadmin

from users.views import mylogin
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView
from organization.views import OrgView

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),

    # xadmin, 支持image字段显示的url配置
    url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),

    # 处理静态文件
    url('^$', TemplateView.as_view(template_name="index.html"), name="index"),
    # url('^login/$', TemplateView.as_view(template_name="login.html"), name="login")
    # 基于函数的处理方式
    # url('^login/$', mylogin, name="login")
    url("^login/$", LoginView.as_view(), name="login"),
    url("^register/$", RegisterView.as_view(), name="register"),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name="active"),
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget"),
    url(r'^reset/(?P<reset_code>.*)/$', ResetView.as_view(), name="reset"),
    url(r'^modify/$', ModifyPwdView.as_view(), name="modify"),
    url(r'^org/', include('organization.urls', namespace="org")),
]
Exemplo n.º 11
0
from users.views import LoginView, RegisterView, ForgetPwdView, ResetView, ModifyPwdView, UserinfoView, UploadImageView, UpdatePwdView, SendEmailCodeView, UpdateEmailView, MyCourseView, MyFavTeacherView, MyFavCourseView, MyFavOrgView, MyMessageView, IndexView

from django.urls import path, re_path
from .views import quit
from . import views

app_name = 'users'

urlpatterns = [
    path('', IndexView.as_view(), name="index"),
    path('login/', LoginView.as_view(), name='login'),
    path('register/', RegisterView.as_view(), name='register'),
    path('forget/', ForgetPwdView.as_view(), name='forget'),
    re_path('reset/(?P<active_code>.*)/',
            ResetView.as_view(),
            name='reset_pwd'),
    path('modify/', ModifyPwdView.as_view(), name='modify'),
    path('info/', UserinfoView.as_view(), name='user_info'),
    path('image/upload', UploadImageView.as_view(), name='image_upload'),
    path('update/pwd', UpdatePwdView.as_view(), name='update_pwd'),
    path('sendmail_code/', SendEmailCodeView.as_view(), name='sendmail_code'),
    path('update_email/', UpdateEmailView.as_view(), name='update_email'),
    path('my_course/', MyCourseView.as_view(), name='my_course'),
    path('myfav/org/', MyFavOrgView.as_view(), name="myfav_org"),
    path('myfav/teacher/', MyFavTeacherView.as_view(), name="myfav_teacher"),
    path('myfav/course/', MyFavCourseView.as_view(), name="myfav_course"),
    path('my_message/', MyMessageView.as_view(), name="my_message"),
    path('quit/', views.quit, name='quit'),
]
Exemplo n.º 12
0
from users.views import (
	LoginView, RegisterView, ActiveUserView,
	ForgetPwdView, ResetView, ModifyPwdView,
)
from organization.views import OrgView

urlpatterns = [
	path('xadmin/', xadmin.site.urls),
	path('', TemplateView.as_view(template_name='index.html'), name='index'),
	path('login/', LoginView.as_view(), name='login'),
	path('register/', RegisterView.as_view(), name='register'),
	path('captcha/', include('captcha.urls')),
	path('forget/', ForgetPwdView.as_view(), name='forget_pwd'),
	# 邮件验证界面
	url(r'^active/(?P<active_code>.*?)/$', ActiveUserView.as_view(),
			name='user_active'),
	url(r'^reset/(?P<active_code>.*?)/$', ResetView.as_view(),
			name='reset_pwd'),
	url(r'^modify_pwd/(?P<active_code>.*?)/$', ModifyPwdView.as_view(),
			name='modify_pwd'),
	
	# 课程机构url配置
	url(r'^org/', include('organization.urls')),
	
	# 课程相关url配置
	url(r'^course/', include('courses.urls')),
	
	# 上传文件访问
	url(r'^media/(?P<path>.*)/$', serve, {'document_root': MEDIA_ROOT}),
]
Exemplo n.º 13
0
"""
from django.conf.urls import url,include
from django.contrib import admin
import xadmin
from django.views.generic import TemplateView
# from users.views import user_login
from users.views import LoginView,RegisterView,ActiveUserView,ForgetPwdView,ResetView,ModifyPwdView
from organization.views import OrgView
from django.views.static import serve # 处理静态文件
from MxOnline.settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url('^$',TemplateView.as_view(template_name='index.html'),name='index'),
    # url('^login/$',user_login,name='login'), # 基于函数视图,这样配置url
    url('^login/$',LoginView.as_view(),name="login"),
    url('^register/$',RegisterView.as_view(),name="register"),
    url('^captcha/',include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$',ActiveUserView.as_view(),name='user_active'),
    url(r'^forget/$',ForgetPwdView.as_view(),name='forget_pwd'),
    url(r'^reset/(?P<active_code>.*)/$',ResetView.as_view(),name='reset_pwd'),
    url(r'^modify_pwd/(?P<active_code>.*)/$',ModifyPwdView.as_view(),name='modify_pwd'),
    url(r'^media/(?P<path>.*)$',serve,{"document_root":MEDIA_ROOT}), # 配置上传文件的访问处理函数

    url('^org/',include('organization.urls',namespace='org')), # 课程机构url设置

    #课程相关url配置
    url(r'^course/',include('courses.urls',namespace="course")),

]
Exemplo n.º 14
0
# _*_ coding: utf-8 _*_
__author__ = 'Joe'
__date = '17/6/18 下午1:58'
from django.conf.urls import url, include
from users.views import UserInfoView, UploadImageView, ModifyPwdView, SendEmailCodeView, UpdateEmailView, MyCourseView, \
    MyFavOrgView, MyFavCourseView, MyFavTeacherView, MyMessageView

urlpatterns = [
    # 用户信息
    url(r'^info/$', UserInfoView.as_view(), name="user_info"),
    # 用户头像上传
    url(r'^image/upload/$', UploadImageView.as_view(), name="image_upload"),
    # 个人中心修改密码
    url(r'^update/pwd/$', ModifyPwdView.as_view(), name="update_pwd"),
    # 发送邮箱验证码
    url(r'^sendemail_code/$',
        SendEmailCodeView.as_view(),
        name="sendemail_code"),
    # 修改邮箱
    url(r'^update_email/$', UpdateEmailView.as_view(), name="update_email"),
    # 我的课程
    url(r'^my_course/$', MyCourseView.as_view(), name="my_course"),
    # 我收藏的机构
    url(r'^myfav/org/$', MyFavOrgView.as_view(), name="myfav_org"),
    # 我收藏的课程
    url(r'^myfav/course/$', MyFavCourseView.as_view(), name="myfav_course"),
    # 我收藏的教师
    url(r'^myfav/teacher/$', MyFavTeacherView.as_view(), name="myfav_teacher"),
    # 我的消息
    url(r'^mymessage/$', MyMessageView.as_view(), name="mymessage"),
Exemplo n.º 15
0
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
from django.views.static import serve
import xadmin
from Teacher.settings import MEDIA_ROOT

from users.views import LoginView, RegisterView, ActiveUserView, ForgetView, ResetView, ModifyPwdView ,LogoutView

urlpatterns = [
    url(r'^teacher/', xadmin.site.urls,name='teacher'),
    url('^$', TemplateView.as_view(template_name='index.html'), name='index'),
    url('^login/$', LoginView.as_view(), name='login'),
    url('^logout/$', LogoutView.as_view(), name="logout"),
    url('^register/$', RegisterView.as_view(), name='register'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'activity/(?P<active_code>.*)/$', ActiveUserView.as_view(), name="user_active"),
    url(r'^forget', ForgetView.as_view(), name="forget_pwd"),
    url(r'^modify_pwd', ModifyPwdView.as_view(), name="modify_psw"),
    url(r'reset/(?P<active_code>.*)/$', ResetView.as_view(), name="user_active"),
    url(r'^media/(?P<path>.*)$',  serve, {"document_root":MEDIA_ROOT}),
    url(r'^users/', include('users.urls',namespace="users")),
    url(r'^questions/', include('questions.urls',namespace="questions")),
    url(r'^exam/', include('exam.urls',namespace="exam")),
    url(r'^class/', include('classs.urls',namespace="class")),
    url(r'^operation/', include('operation.urls',namespace="operation")),

]
Exemplo n.º 16
0
    path('login/', LoginView.as_view(),
         name="login"),  #调用as_view()方法,不是传这个方法的句柄出来
    path('register/', RegisterView.as_view(),
         name="register"),  #调用as_view()方法,不是传这个方法的句柄出来
    path('captcha/', include('captcha.urls')),  #配置captcha路径
    path('active/<path:active_code>/',
         ActiveUserView.as_view(),
         name="user_active"),  #url中提取一个变量当作参数,?P:表示要提取一个变量当作参数
    #<>:尖括号里的字段任意命名
    #.*:正则表达式,表示把active后面的东西全部取出来,并放到active_code参数中
    #/:表示路径
    path('forget/', ForgetPwdView.as_view(),
         name="forget_pwd"),  #配置忘记密码页面的访问路径
    path('reset/<path:active_code>/', ResetView.as_view(),
         name="reset_pwd"),  #配置点击重置密码邮箱链接的路径
    path('modify_pwd/', ModifyPwdView.as_view(),
         name="modify_pwd"),  # 配置修改密码页面的访问路径

    #课程机构首页
    # path('org_list/', OrgView.as_view(), name="org_list"),  # 配置课程列表页面的访问路径
    #课程机构url配置
    path('org/',
         include('organization.urls',
                 namespace='org')),  #配置课程机构url,namespace指明命名空间,用命名空间做限定

    #配置上传文件的访问处理函数
    path(
        'media/<path:path>', serve,
        {"document_root": MEDIA_ROOT
         }),  #配置处理引用midia路径下文件的路径,调用serve方法,需要传入参数{"document_root":MEDIA_ROOT}
Exemplo n.º 17
0
from django.conf.urls import url, include

from users.views import LoginView, RegisterView, ActivateUserView, ForgetPwdView, ResetView, ModifyPwdView, \
    UserInfoView, LogoutView, UploadImageView, UpdatePwdView, SendEmailCodeView, UpdateEmailView, MyCourseView, \
    MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name="login"),  # 登录 # 根目录匹配的时候是不需要“/”的所以要把/login/的“/”去掉
    url(r'^register/$', RegisterView.as_view(), name="register"),  # 注册
    url(r'^activate/(?P<activate_code>.*)$', ActivateUserView.as_view(), name="user_activate"),  # 激活
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget_pwd"),  # 返回找回密码页面
    url(r'^reset/(?P<reset_code>.*)$', ResetView.as_view(), name="reset_pwd"),  # 找回密码
    url(r'^modify/$', ModifyPwdView.as_view(), name="modify_pwd"),  # 处理找回密码逻辑

    url(r'^logout/$', LogoutView.as_view(), name='logout'),  # 退出登录
    url(r'^info/$', UserInfoView.as_view(), name="user_info"),  # 用户信息页及信息页个人资料修改
    url(r'^image/upload/$', UploadImageView.as_view(), name='image_upload'),  # 用户头像修改
    url(r'^update/pwd/$', UpdatePwdView.as_view(), name='update_pwd'),  # 用户个人中心修改密码
    url(r'^sendemail_code/$', SendEmailCodeView.as_view(), name='sendemail_code'),  # 修改邮箱时 发送邮箱验证码
    url(r'^update_email/$', UpdateEmailView.as_view(), name='update_email'),  # 修改邮箱时,验证邮箱和验证码
    url(r'^mycourse/$', MyCourseView.as_view(), name='mycourse'),  # 我的课程
    url(r'^myfav/org/$', MyFavOrgView.as_view(), name='myfav_org'),  # 我收藏的课程机构
    url(r'^myfav/teacher/$', MyFavTeacherView.as_view(), name='myfav_teacher'),  # 我收藏的授课讲师
    url(r'^myfav/course/$', MyFavCourseView.as_view(), name='myfav_course'),  # 我收藏的课程
    url(r'^mymessage/$', MyMessageView.as_view(), name='mymessage'),  # 我的消息

]

Exemplo n.º 18
0
    url(r'^register/$', RegisterView.as_view(), name="register"),
    # 用户退出登录url配置
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    # 用户注册验证码图片url配置
    url(r'^captcha/', include('captcha.urls')),
    # 用户激活链接url配置
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name="user_active"),
    # 忘记密码url配置
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget_pwd"),
    # 用户密码重置url配置
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name="reset_pwd"),
    # 修改密码url; 用于passwordreset页面提交表单
    url(r'^modify_pwd/$', ModifyPwdView.as_view(), name="modify_pwd"),

    # 电影相关url配置
    url(r'^movie/', include('movies.urls', namespace="movie")),
    # 用户相关url配置
    url(r'^users/', include('users.urls', namespace="users")),
    # 配置上传文件的访问处理函数
    url(r'^media/(?P<path>.*)/$', serve, {'document_root': MEDIA_ROOT}),

    # 富文本编辑器ueditor相关url
    url(r'^ueditor/', include('DjangoUeditor.urls')),
]

# 全局404页面配置
handler404 = 'users.views.page_not_found'
# 全局503页面配置
Exemplo n.º 19
0
from django.conf.urls.static import static

from users.views import LoginView, RegisterView, UserCenterView, ModifyPwdView, LogoutView
from course.views import CourseLists, index, PaperListView, DownAddView, DownloadFunView, QuestionsView, base
from operate.views import PaperView, ChouxuanView, AddQuestionView, ScoreView, Score_Paper, \
    Change_answer_logView, Paper_Chang_QuestionView

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^admin/', admin.site.urls),

    # users
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^usercenter/$', UserCenterView.as_view(), name='usercenter-info'),
    url(r'^password_reset/$', ModifyPwdView.as_view(), name='password_reset'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),

    # index
    url(r'^$', index, name='index'),
    url(r'^base/$', base, name='base'),

    # course
    # url(r'^papersindex/$', PapersIndex.as_view(), name='papersindex'),
    url(r'^courselists/$', CourseLists, name='courselists'),
    url(r'^paperlists/$', PaperListView.as_view(), name='paperlists'),
    url(r'^questions/(?P<questions_id>.*)/$',
        QuestionsView.as_view(),
        name='questions'),
    # url(r'download_info/(?P<page_number>.*)$', DownloadFunView.as_view(), name="download"),
    # url(r'^download_add/$', DownAddView.as_view(), name='download_add'),
Exemplo n.º 20
0
urlpatterns = [
    # url(r'^admin/', admin.site.urls),
    url(r'^xadmin/', xadmin.site.urls),
    # url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name='user_active'),
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name='reset_pwd'),
    url(r'^modify_pwd/$', ModifyPwdView.as_view(),
        name='modify_pwd'),  # 智障地import了ModifyForm,然后.as_view() 。。。
    # 机构分支url
    url(r'^org/', include('organization.urls', namespace='org')),
    # 课程分支url
    url(r'^course/', include('courses.urls', namespace='course')),
    # 配置上传文件的访问处理函数
    url(r'^media/(?P<path>.*)', serve, {'document_root': MEDIA_ROOT}),
    # 配置静态文件处理函数
    # url(r'^static/(?P<path>.*)', serve, {'document_root': STATIC_ROOT}),
    # 用户分支url
    url(r'^users/', include('users.urls', namespace='users')),
]

handler403 = 'users.views.page_forbidden'
handler404 = 'users.views.page_not_found'
Exemplo n.º 21
0
from users.views import LoginView, LogoutView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView
from users.views import IndexView
from testonline.settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url('^$', IndexView.as_view(), name="index"),
    url('^login/$', LoginView.as_view(), name="login"),
    url('^logout/$', LogoutView.as_view(), name="logout"),
    url('^register/$', RegisterView.as_view(), name="register"),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name="user_active"),
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget_pwd"),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(), name="reset_pwd"),
    url(r'^modify_pwd/$', ModifyPwdView.as_view(), name="modify_pwd"),

    # 课程机构url配置
    url(r'^org/', include('organization.urls', namespace='org')),

    # 课程相关url配置
    url(r'^course/', include('courses.urls', namespace='course')),

    # 配置上传文件的访问处理函数
    url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),

    # 配置静态文件的访问处理函数
    # url(r'^static/(?P<path>.*)$', serve, {"document_root": STATIC_ROOTS}),

    # 讲师相关url配置
    url(r'^teacher/', include('courses.urls', namespace='course')),
Exemplo n.º 22
0
    path("register/", RegisterView.as_view(), name = "register" ),

    # 验证码url
    path("captcha/", include('captcha.urls')),

    # 激活用户url
    re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name= "user_active"),

    # 忘记密码
    path('forget/', ForgetPwdView.as_view(), name= "forget_pwd"),

    # 重置密码urlc :用来接收来自邮箱的重置链接
    re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name="reset_pwd"),

    # 修改密码url; 用于passwordreset页面提交表单
    path('modify_pwd/', ModifyPwdView.as_view(), name="modify_pwd"),

    #驾驶舱
    url(r'^dashboard/', include(router.urls)),
    # url(r'^dashboard/', include(dashing.urls)),

    # 知识分类app的url配置,类型的也在里面
    path("org/", include('organization.urls', namespace='org')),
    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    re_path('media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT }),
    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    # re_path('static/(?P<path>.*)', serve, {"document_root": STATIC_ROOT}),
    # 产品app的url配置
    path("course/", include('courses.urls', namespace="course")),
    # user app的url配置
    path("users/", include('users.urls', namespace="users")),
Exemplo n.º 23
0
URL configuration originally generated by "django-admin startproject" using Django 2.1.7 for the system;
@author: Liu Haodong, Zhao Jichen, Ye Yifan, and Wang Annong
'''

from . import views;

import xadmin
from django.urls import path, include, re_path
from django.views.static import serve
from PRS.settings import MEDIA_ROOT
from users.views import LoginView, ActiveUserView, RegisterView, ForgetPwdView, ResetView, ModifyPwdView, LogoutView

# the "urlpatterns" list routes URLs to views
urlpatterns = [
    path('me/', xadmin.site.urls),  # Xadmin
    path('', views.home, name = 'index'),  # the home page
    path('home/', views.home, name = 'home'),  # the home page
    path('reg/', views.reg, name = 'reg'),  # the registration page
    path('reg/data_refresh/', views.data_refresh, name = 'data_refresh'),  # the registration page with real-time updated data
    path('reg/rec_reg/', views.rec_reg, name = 'rec_reg'),  # the registration result page
    path('about/', views.about, name = 'about'),  # the system introduction page
    path('login/', LoginView.as_view(), name = 'login'),  # the login page
    path('sign-up/', RegisterView.as_view(), name = 'sign-up'),  # the sigh-up page
    re_path(r'^media/(?P<path>.*)', serve, {'document_root': MEDIA_ROOT}),  # the media resource management url
    path('captcha/', include('captcha.urls')),  # the captcha resource management url
    re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name = 'user_active'),  # the page showing after activating successfully
    path('forget/', ForgetPwdView.as_view(), name = 'forget_pwd'),  # the page for asking for resetting the password
    re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name = 'reset_pwd'),  # the page for resetting the password
    path('modify_pwd/', ModifyPwdView.as_view(), name = 'modify_pwd'),  # the page for modifying the password
    path('logout/', LogoutView.as_view(), name = "logout"),  # the logout page
]