コード例 #1
0
ファイル: urls.py プロジェクト: cyj763097998/qcplay
#from apps.users import views
from django.views.static import serve

from MxOnline.settings import MEDIA_ROOT
#from MxOnline.settings import STATIC_ROOT

from apps.users.views import IndexView, LoginView, LogoutView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, LoginUnsafeView
from apps.organization.views import OrgView, OrgTeacherView, OrgCourseView
from extra_apps import xadmin

from users.views import LoginUnsafeView

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('index/', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name='login'),
    #测试sql注入
    #path('login/', LoginUnsafeView.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>.*)/',
            ActiveUserView.as_view(),
            name='user_active'),
    path('forgetpwd/', ForgetPwdView.as_view(), name='forget_pwd'),
    re_path('reset/(?P<active_code>.*)/',
            ResetView.as_view(),
            name='reset_pwd'),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),
コード例 #2
0
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include, re_path
from django.views.generic import TemplateView
from django.views.static import serve

import xadmin
# from apps.organization.views import OrgView
from apps.users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, \
    LogoutView, IndexView
from hongzhenye.settings import MEDIA_ROOT

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('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('^captcha/', include('captcha.urls')),
    url('^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name='user_active'),
    url('^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),
    url('^reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd'),
    url('^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'),
    url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
    # re_path(r'^static/(?P<path>.*)$', serve,{'document_root':STATIC_ROOT}),
    url('ueditor/', include('DjangoUeditor.urls')),

    #课程机构url配置
コード例 #3
0
from django.contrib import admin
from django.urls import path, include, re_path
from django.views.generic import TemplateView
import xadmin
from apps.users.views import LoginViews, RegisterViews, ActiveUserView, ForgetPwdView, ResetPasswordView, UserCenterView, LogoutViews
# from apps.organization.views import Org_listView
from django.views.static import serve  # 处理静态文件的内部函数
from mxonline.settings import MEDIA_ROOT
# ,STATIC_ROOT
from apps.users.views import IndexView
# from django.conf.urls import handler404, handler500

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    # path('center/', UserCenterView.as_view(), name='user_center'),
    path('', IndexView.as_view(), name="index"),
    path('login/', LoginViews.as_view(), name="login"),
    path('logout/', LogoutViews.as_view(), name="logout"),
    path('register/', RegisterViews.as_view(), name="register"),
    path('captcha/', include('captcha.urls')),
    re_path('active/(?P<active_code>.*)/',
            ActiveUserView.as_view(),
            name="active_user"),
    path('forget/', ForgetPwdView.as_view(), name="forget_pwd"),
    re_path('reset/(?P<active_code>.*)/',
            ResetPasswordView.as_view(),
            name="reset_password"),

    # 下面的页面就是重载的教育机构信息页面  部分继承的展示操作
    path('org/', include('apps.organization.urls', namespace="org")),