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(), name='user_active'), re_path( 'reset/(?P<active_code>.*)/', ResetView.as_view(), name='reset_pwd'), # haystack url path('search/', include('haystack.urls')), # 评论url path('comment', CommentView.as_view(), name='comment'), # # 排行榜 # path('rank/', RankView.as_view(), name='rank'), # 用户中心url path('user_info', UserInfoView.as_view(), name='user_info'), # 修改头像url path('image/upload/', UploadImageView.as_view(), name='upload_image'), # 找回密码url path('forget/', ForgetPwdView.as_view(), name='forget_pwd'), path('reset_pwd/', ResetPwdView.as_view(), name='reset_pwd'), # 退出登录url path('logout/', LogOutView.as_view(), name='logout'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # 配置xadmin的图像文件加载路径
urlpatterns = [ # url(r'^admin/', admin.site.urls), url(r'^xadmin/', xadmin.site.urls), url(r'^$', IndexView.as_view(), 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="user_active"), url(r'^captcha/', include('captcha.urls')), url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'), url(r'^reset/(?P<active_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'^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')),
from django.views.generic.base import RedirectView from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView from users.views import IndexView, ModifyPwdView, LogOutView from organization.views import OrgView from mxonline3.settings import MEDIA_ROOT favicon_view = RedirectView.as_view(url='static/favicon.ico/', permanent=True) urlpatterns = [ path('favicon.ico/', favicon_view), path('xadmin/', xadmin.site.urls), # path('ueditor/', include('DjangoUeditor.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>.*)/$', 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"), # 课程机构url配置 path("org/", include('organization.urls', namespace="org")), # 工作岗位url配置 path("job/", include('jobs.urls', namespace="job")), # 课程相关url配置 path('course/', include('courses.urls', namespace="course")),
import xadmin from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, \ LogOutView, IndexView from MxOnline.settings import MEDIA_ROOT, STATIC_ROOT 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<active_code>.*)/$', ActiveUserView.as_view(), name="user_active"), # 忘记密码页面 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'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}), # 配置static文件的处理路径
from django.conf.urls import include, url from django.contrib import admin from users.views import LoginView, LogOutView, SignupView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), #Este es el redireccionamiento de la parte de users url(r'^login$', LoginView.as_view(), name='users_login'), url(r'^logout$', LogOutView.as_view(), name='users_logout'), url(r'^signup$', SignupView.as_view(), name='users_signup'), ]
from django.conf.urls import url, include from users import views as user_views from rest_framework import routers from users.views import LoginView, LogOutView urlpatterns = [ # url(r'^role/list', user_views.RoleListView.as_view(), name='role_list'), url(r'^login/', LoginView.as_view(), name='manager_login'), url(r'^logout/', LogOutView.as_view(), name='manager_logout'), ]
""" from django.conf.urls import url, include from django.contrib import admin import xadmin from qi1.settings import MEDIA_ROOT from django.views.static import serve # 处理静态文件 from django.views.generic import TemplateView from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, LogOutView, IndexView from organizations.views import OrgView urlpatterns = [ url(r'^admin/', admin.site.urls), 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(r'^org/', include('organizations.urls', namespace='org')), # 配置上传文件的访问处理函数 url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}), # url(r'^static/(?P<path>.*)$', serve, {'document_root': STATIC_ROOT}), # 课程列表