Exemplo n.º 1
0
from django.views.static import serve

import xadmin

from platorm.settings import MEDIA_ROOT

from users.views import LoginView, RegisterView, ResetPwdView, UpdateMobileView, LogoutView

urlpatterns = [
    url(r'^admin/', xadmin.site.urls),
    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'^reset_pwd/$', ResetPwdView.as_view(), name='reset_pwd'),
    url(r'^update_mobile/$', UpdateMobileView.as_view(), name='update_mobile'),
    url(r'^users/', include('users.urls', namespace='users')),
    url(r'^policy/', include('policy.urls', namespace='policy')),
    url(r'^patent/', include('patent.urls', namespace='patent')),
    url(r'^project/', include('project.urls', namespace='project')),
    url(r'^incubator/', include('incubator.urls', namespace='incubator')),
    url(r'^gallery/', include('gallery.urls', namespace='gallery')),
    url(r'^club/', include('club.urls', namespace='club')),
    url("operation/", include('operation.urls', namespace="operation")),
    url(r'^ueditor/', include('DjangoUeditor.urls')),

    # 配置上传文件访问处理的函数
    url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT})
]
Exemplo n.º 2
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include,re_path
from django.conf import settings
from django.conf.urls.static import static
from django.views.static import serve


from users.views import index,LeaveMsgView,LoginView,RegisterView,ActiveView,ForgetPwdView,ResetPwdView,ModifyPwdView
from user_operations.views import LikeView



urlpatterns = [
    path('admin/', admin.site.urls),
    path('ckeditor',include('ckeditor_uploader.urls')),
    path('captcha/',include('captcha.urls')),
    path('',index,name='index'),
    path('gbook/',LeaveMsgView.as_view(),name='gbook'),
    path('blogs/',include('blogs.urls','blogs')),
    re_path(r'^media/(?P<path>.*)$',serve,{'document_root':settings.MEDIA_ROOT}),
    path('login/',LoginView.as_view(),name='login'),
    path('register/',RegisterView.as_view(),name='register'),
    path('active/<str:active_code>',ActiveView.as_view(),name='active'),
    path('forgetpwd/',ForgetPwdView.as_view(),name='forget_pwd'),
    path('reset/<str:active_code>',ResetPwdView.as_view(),name='reset_pwd'),
    path('modifypwd/',ModifyPwdView.as_view(),name='modify_pwd'),
    path('operation/',include('user_operations.urls','operation')),
]
urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) 
Exemplo n.º 3
0
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView
from users.views import ResetPwdView, ModifyPwdView, LogoutView, IndexView
from MxOnlie.settings import MEDIA_ROOT


urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name="login"),
    path(r'logout/', LogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name="register"),
    path('captcha/', include('captcha.urls')),
    path('active/<str:active_code>/', ActiveUserView.as_view(), name='user_active'),
    path('forget/', ForgetPwdView.as_view(), name= "forget_pwd"),
    path('reset/<str:active_code>/', ResetPwdView.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(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT })

]
Exemplo n.º 4
0
from integral.views import AlipayView, RechargeView

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^register/$', RegisterView.as_view(), name="register"),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^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'^resetpwd/$', ResetPwdView.as_view(), name="reset_password"),

    # 签到
    url(r'^sign/$', SignView.as_view(), name="sign"),
    url(r'^course/', include('courses.urls', namespace="course")),
    url(r'^article/', include('article.urls', namespace="article")),
    url(r'^live/', include('live.urls', namespace="live")),
    url(r'^users/', include('users.urls', namespace="users")),
    # 项目展示
    url(r'^project/', include('project.urls', namespace="project")),

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

    # 编程项目文件上传
    # url(r'^upload/$', name='post_apply_data'),
Exemplo n.º 5
0

from users.views import LoginView,RegisterView,ActiveUserView,ForgetPwdView,ResetView,ResetPwdView, LogoutView, IndexView
from organization.views import OrgView
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'^reset/$', ResetPwdView.as_view(), name="reset_pwd_submit"),

    #课程机构url配置
    url(r'^org/', include('organization.urls',namespace="org")),
    #课程相关url配置
    url(r'^course/', include('courses.urls',namespace="course")),
    #个人中心相关url配置
    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}),

]
#全局404页面配置
handler404 = 'users.views.page_not_found'
Exemplo n.º 6
0
import xadmin
from django.views.static import serve
from MxOnline.settings import MEDIA_ROOT

from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetPwdView, ModifyPwdView, LogoutView, IndexView

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    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'^ueditor/', include('DjangoUeditor.urls')),
    url(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name='user_active'),
    url(r'^reset/(?P<active_code>.*)/$', ResetPwdView.as_view(), name='reset_pwd'),
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),
    url(r'^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'),

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

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

    # 用户信息的url配置
    url(r'^user/', include('users.urls', namespace='user')),

    # 配置上传文件的访问路由
    url(r'media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
Exemplo n.º 7
0
import DjangoUeditor
import xadmin
from django.urls import path, include, re_path
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetPwdView, ModifyPwdView, LogoutView, IndexView
from django.views.static import serve

from .settings import MEDIA_ROOT

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    re_path(r'^ueditor/', include('DjangoUeditor.urls')),
    path('', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name='login'),
    path('register/', RegisterView.as_view(), name='register'),
    path('captcha/', include('captcha.urls')),
    path('loguot/', LogoutView.as_view(), name='logout'),
    re_path(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),
    # re_path(r'^static/(?P<path>.*)',serve,{"document_root": STATIC_ROOT }),
    re_path('active/(?P<active_code>.*)/',
            ActiveUserView.as_view(),
            name='user_active'),
    re_path('reset/(?P<reset_code>.*)/', ResetPwdView.as_view(), name='reset'),
    path('forget/', ForgetPwdView.as_view(), name='forget'),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),
    path('cor/', include('courses.urls', namespace='cor')),
    path('org/', include('organization.urls', namespace='org')),
    path('user/', include('users.urls', namespace='user')),
]
# Django2.0中 在templates下创建404.html后 Django会自动寻找
# handler404 = 'users.views.page_not_found'
# handler500 = 'users.views.page_error'
Exemplo n.º 8
0
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView,\
    ResetView, ResetPwdView, LogoutView, IndexView

urlpatterns = [
    # path('admin/', admin.site.urls),
    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'),
    re_path(r'^captcha/', include('captcha.urls')),
    re_path(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name='user_active'),
    path('forgetpwd/', ForgetPwdView.as_view(), name='forget_pwd'),
    re_path(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd_get'),
    path('resetpwd/', ResetPwdView.as_view(), name='reset_pwd_post'),

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

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

    # 用户信息相关url配置
    path('user/', include('users.urls', namespace='user')),

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

    # Uedit富文本编辑器
Exemplo n.º 9
0
from django.views.static import serve

from users.views import LoginView, RegisterView, UserAccountActivate, ForgetPwdView, ResetPwdView, ModifyPwdView, LogoutView, IndexView
from organization.views import OrgView
from OnlineMx.settings import MEDIA_ROOT
import xadmin
urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^index/$', IndexView.as_view(), name="index"),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^login/$', LoginView.as_view(), name="userlogin"),
    url(r'^logout/$', LogoutView.as_view(), name="userlogout"),
    url(r'^register/$', RegisterView.as_view(), name="register"),
    url(r'^activate/(?P<code>.+)/$',
        UserAccountActivate.as_view(),
        name="activate"),
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget"),
    url(r'^resetpwd/(?P<code>.+)/$', ResetPwdView.as_view(), name="resetpwd"),
    url(r'^modifypwd/$', ModifyPwdView.as_view(), name="modifypwd"),
    url(r'^org-list/$', OrgView.as_view(), name="orglist"),
    #配置后台上传文件处理url,上下文渲染(可以在Template的html文件中使用静态文件路径)
    # [14/Aug/2018 21:15:36] "GET /uploadimage/courses/2018/06/02.jpg HTTP/1.1" 200 63229
    # [14/Aug/2018 21:15:36] "GET /uploadimage/courses/2018/06/bank3_5bUIRy1.jpg HTTP/1.1" 200 4057
    url(r'^uploadimage/(?P<path>.+)$', serve, {"document_root": MEDIA_ROOT}),
    # url(r'^static/(?P<path>.+)$',serve,{"document_root":STATIC_ROOT}),
    url(r'^org/', include("organization.urls", namespace="org")),
    url(r'^course/', include("course.urls", namespace="course")),
    url(r'^user/', include("users.urls", namespace="user")),
]
handler404 = "users.views.page_not_found"
handler500 = "users.views.page_error"
Exemplo n.º 10
0
from users.views import LoginView, RegisterView, ActiveView, LogoutView, ForgetPwdView, ResetPwdView
from users.views import IndexView
from MxOnline2.settings import MEDIA_ROOT, STATIC_ROOT
import xadmin

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    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<code>.*)/$', ActiveView.as_view(), name='active'),
    url(r'^forgetpwd/$', ForgetPwdView.as_view(), name='forgetpwd'),
    url(r'^resetpwd/(?P<code>.*)/$', ResetPwdView.as_view(), name='resetpwd'),

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

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

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

    #公开课列表
    url(r'^course/', include('courses.urls', namespace='course')),

    #个人信息
    url(r'^users/', include('users.urls', namespace='users')),
Exemplo n.º 11
0
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    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
import xadmin
from django.views.generic import TemplateView

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

urlpatterns = [
    url(r'^admin/',include(admin.site.urls)),
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^index/',TemplateView.as_view(template_name='index.html')),
    url(r'^login/',LoginView.as_view(),name='login'),
    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'^forgetpwd/',ForgetPwdView.as_view(),name='forgetpwd'),
    url(r'^reset/(?P<active_code>.*)/',ResetPwdView.as_view(),name="resetPwd"),
    url(r'^modify_pwd/',ModifyPwdView.as_view(),name="modify_pwd"),
    url(r'^org_list/',OrgView.as_view(),name="org_list"),
]
Exemplo n.º 12
0
from users.views import UserLoginView, UserLogoutView, IndexView, RegisterView, ActiveUserView, ForgetPwdView, ModifyPwdView, ResetPwdView
from organization.views import OrgListView
from MxOnline.settings import MEDIA_ROOT
    # , STATIC_ROOT

import xadmin


urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url('^$', IndexView.as_view(), name="index"),
    url('^login/$', UserLoginView.as_view(), name="login"),
    url('^logout/$', UserLogoutView.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('^forgetpwd/$', ForgetPwdView.as_view(), name="forgetpwd"),
    url('^reset/(?P<reset_code>.*)/$', ResetPwdView.as_view(), name="user_reset"),
    url('^modifypwd/$', ModifyPwdView.as_view(), name="modifypwd"),
    url(r'^org/', include('organization.urls', namespace="org")),
    url(r'^course/', include('course.urls', namespace="course")),
    url(r'^users/', include('users.urls', namespace="users")),
    url(r'^ueditor/',include('DjangoUeditor.urls' )),
    url(r'^media/(?P<path>.*)$', serve, {"document_root":MEDIA_ROOT}),
    # url(r'^static/(?P<path>.*)$', serve, {"document_root":STATIC_ROOT}),

]

handler404 = 'users.views.page_not_found'
handler500 = 'users.views.page_error'
Exemplo n.º 13
0
from django.contrib import admin
import xadmin
from users.views import LoginView, index, RegisterView, ActiveUserView, ForgetPwdView, ResetPwdView, ModifyView, MyTestView
from organization.views import OrgListView

from django.views.static import serve
from settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^$', index, name='index'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name='active_user'),
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget'),
    url(r'^reset_pwd/(?P<reset_code>.*)/$', ResetPwdView.as_view(), name='reset'),
    url(r'^modify/$', ModifyView.as_view(), name='modify'),

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

    # apps
    url(r'^org/', include('organization.urls', namespace='org')),
    url(r'^course/', include('courses.urls', namespace='course')),
    url(r'^user/', include('users.urls', namespace='user')),
    # test
    url(r'^test/$', MyTestView.as_view())
]
Exemplo n.º 14
0
from django.views.generic import TemplateView
import xadmin
from django.views.static import serve

from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ResetPwdView
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"),
    url(r'^reset_pwd/$', ResetPwdView.as_view(), name="reset_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}),
]
Exemplo n.º 15
0
from films.views import IndexView, MovieListView, MovieDetailView, CommentView
import xadmin

urlpatterns = [
    # path('admin/', admin.site.urls),  #  注释掉原本的admin url
    # 添加xadmin的url
    path('xadmin/', xadmin.site.urls),
    # 处理图片显示的url, 使用django自带的serve,传入media_root的参数
    re_path(r'^media/(?P<path>.*)', serve, {'document_root': MEDIA_ROOT}),
    # 添加验证码url
    path('captcha', include('captcha.urls')),
    # 登录注册url
    path('login/', LoginView.as_view(), name='login'),
    path('register/', RegisterView.as_view(), name='register'),
    # 重设密码url
    path('reset_pwd/', ResetPwdView.as_view(), name='reset_pwd'),
    # path('users/', include('users.urls')),
    # 添加详情
    # path('detail/', TemplateView.as_view(template_name='films/movie_detail.html'), name='detail'),
    re_path('movie_list/(?P<movie_id>\d+)/',
            MovieDetailView.as_view(),
            name='movie_detail'),
    # 主页url
    # path('', TemplateView.as_view(template_name='index.html'), name='index'),
    path('', IndexView.as_view(), name='index'),
    # 电影列表视图
    path('movie_list/', MovieListView.as_view(), name='movie_list'),
    # path('films/', include('films.urls', namespace='films')),
    # 激活账户验证码url
    re_path('active/(?P<active_code>.*)/',
            ActiveUserView.as_view(),
Exemplo n.º 16
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.conf import settings
from django.views.generic import TemplateView
from django.views.static import serve
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetPwdView, \
    ModifyPwdView
from organization.views import CourseOrgView, Comments_Upload, CustomAddView, CustomAjaxView

import xadmin
urlpatterns = [
    # url(r'^admin/', admin.site.urls),
    url(r'^admin/', xadmin.site.urls),
    url(r'^$', TemplateView.as_view(template_name='index.html'), name='my_index'),
    url(r'^login/$', LoginView.as_view(), name='my_login'),
    url(r'^register/$', RegisterView.as_view(), name='my_register'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^active/(?P<active_code>\w*)/$', ActiveUserView.as_view(), name='my_active_user'),
    url(r'^forget_pwd/$', ForgetPwdView.as_view(), name='forget_pwd'),
    url(r'^reset/(?P<reset_code>\w*)/$', ResetPwdView.as_view(), name='reset_pwd'),
    url(r'modify_pwd/$', ModifyPwdView.as_view(), name='my_modify_pwd'),
    url(r'^org_list/$', CourseOrgView.as_view(), name='org-list'),
    url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
    # 这个项目里面的测试,尝试用ajax动态的提交内容到后台
    url(r'^comments_upload/$', Comments_Upload.as_view(), name='comments_upload'),
    url(r'^ajax/add/$', CustomAddView.as_view(), name='comments_add'),
    url(r'^ajax/$', CustomAjaxView.as_view(), name='ajax_add'),
]
Exemplo n.º 17
0
import xadmin

from users.views import LoginView, LogoutView, ForgetPWdView, RegisterView, ActiveUserView, ResetPwdView, ModifyPwdView
# from users.views import
# from organization.views import OrgView

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('xadmin/', xadmin.site.urls),
    path('ueditor/', include('DjangoUeditor.urls')),  # required by ueditor
    path('captcha/', include('captcha.urls')),

    # User Register  process control:
    path('', TemplateView.as_view(template_name='index.html'), name="index"),
    path('login/', LoginView.as_view(), name="login"),
    path('logout/', LogoutView.as_view(), name="logout"),
    path('register/', RegisterView.as_view(), name="register"),
    path('active/<str:active_code>',
         ActiveUserView.as_view(),
         name="user_active"),
    path('forgetpwd/', ForgetPWdView.as_view(), name="forget_pwd"),
    path('reset/<str:reset_code>', ResetPwdView.as_view(), name="reset_pwd"),
    path('modifypwd/', ModifyPwdView.as_view(), name="modify_pwd"),

    # 课程机构首页
    # path('org_list/', OrgView.as_view(), name="org_list"),

    # 用户个人中心
    path('users/', include('users.urls')),
]
Exemplo n.º 18
0
    3. 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 users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ResetPwdView
from organization.views import OrgView
from settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^$', TemplateView.as_view(template_name="index.html"), name="index"),
    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^register/$', RegisterView.as_view(), name="register"),
    url(r"^active/(?P<active_code>.*)/$",
        ActiveUserView.as_view(),
        name="active"),
    url(r'^forgent/$', ForgetPwdView.as_view(), name="forgent_pwd"),
    url(r'reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd'),
    url(r'resetpwd/', ResetPwdView.as_view(), name='reset_pwd_datil'),

    # 课程机构首页url
    url(r'^org_list/$', OrgView.as_view(), name="org_list"),

    # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT
    url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
]
Exemplo n.º 19
0
from users.views import IndexView, LoginView, LogoutView, RegisterView, ActiveUserView, ForgetPwdView, ResetPwdView, ModifyPwdView
from django.views.static import serve
from MxOnline2.settings import MEDIA_ROOT

urlpatterns = [
    path('admin/', admin.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'),
    re_path('active/(?P<active_code>.*)/',
            ActiveUserView.as_view(),
            name='active_user'),
    path('forget/', ForgetPwdView.as_view(), name='forget_pwd'),
    re_path('reset/(?P<reset_code>.*?)/',
            ResetPwdView.as_view(),
            name='reset_pwd'),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),
    path('captcha/', include('captcha.urls')),

    # 配置图片路径、静态文件路径
    re_path(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),
    re_path(r'^static/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),
    path('users/', include(users.urls, namespace='users')),
    path('organization/', include(organization.urls,
                                  namespace='organization')),
    path('course/', include(course.urls, namespace='course')),
    # 富文本ckeditor配置url
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
]
Exemplo n.º 20
0
from django.views.static import serve
from datetime import timedelta
from edut_online.settings import MEDIA_ROOT
import xadmin
from users.views import LoginView, RegisterView, ActiveView, ForgetPwdView, ResetPwdView, ModifyPwdView, LogoutView, IndexView

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('register/', RegisterView.as_view(), name='register'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('login/', LoginView.as_view(), name='login'),
    path('captcha/', include('captcha.urls')),
    path('active/<str:active_code>/', ActiveView.as_view(),
         name='user_active'),
    path('forget/', ForgetPwdView.as_view(), name='forget_pwd'),
    path('reset/<str:reset_code>/', ResetPwdView.as_view(), name='reset_pwd'),
    path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),

    #课程机构url配置
    path('org/',
         include(('organizations.urls', 'organizations'), namespace="org")),
    #配置上传文件的访问处理函数
    re_path(r'media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
    # re_path(r'static/(?P<path>.*)$', serve, {'document_root': STATIC_ROOT}),
    # 课程url配置
    path('course/', include(('courses.urls', 'courses'), namespace="course")),
    #个人中心url配置
    path('users/', include(('users.urls', 'users'), namespace="user")),
]