from django.urls import re_path from users.views import UserInfoView, UploadImageView, ChangePwdView from users.views import SendChangeEmailView, ChangeEmailView, MyCourseView from users.views import MyOrgCollectionView, MyTeacherCollectionView, MyCourseCollectionView, MyMessageView urlpatterns = [ re_path(r'^center_info/$', UserInfoView.as_view(), name='center_info'), re_path(r'^my_course/$', MyCourseView.as_view(), name='my_course'), # 我的收藏 re_path(r'^my_collection/orgs/$', MyOrgCollectionView.as_view(), name='collections_orgs'), re_path(r'^my_collection/teachers/$', MyTeacherCollectionView.as_view(), name='collections_teachers'), re_path(r'^my_collection/courses/$', MyCourseCollectionView.as_view(), name='collections_courses'), # 我的消息 re_path(r'^my_message/$', MyMessageView.as_view(), name='my_message'), # 上传头像 re_path(r'^image_upload/$', UploadImageView.as_view(), name='image_upload'), # 修改密码 re_path(r'^change_pwd/$', ChangePwdView.as_view(), name='change_pwd'), # 发送修改邮箱验证码 re_path(r'^send_email/$', SendChangeEmailView.as_view(), name='send_email'),
from django.urls import path from users.views import RegisterView, LoginView, LogoutView, UserInfoView, UpdateEmailView, SendEmailCodeView, \ UpdatePwdView, ForgetPwdView, ModifyPwdView, MyCourseView, MyFavOrgView \ , MyFavTeacherView, MyFavCourseView, UserMessageView app_name = "users" urlpatterns = [ path('info/', UserInfoView.as_view(), name='user_info'), path('register/', RegisterView.as_view(), name='register'), path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name="logout"), path('info/', UserInfoView.as_view(), name="user_info"), path('update_email/', UpdateEmailView.as_view(), name="update_email"), path('sendemail_code/', SendEmailCodeView.as_view(), name="sendemail_code"), path('update/pwd/', UpdatePwdView.as_view(), name="update_pwd"), path('forget_pwd/', ForgetPwdView.as_view(), name="forget_pwd"), path('modify_pwd/', ModifyPwdView.as_view(), name="modify_pwd"), path('mycourse/', MyCourseView.as_view(), name="mycourse"), 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('message/', UserMessageView.as_view(), name="message"), ]
# -*- coding:utf-8 -*- """happy_coding URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 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 from users.views import UserInfoView, UpLoadImageView, UpdatePwdView, SendPwdView urlpatterns = [ url('^info/', UserInfoView.as_view(), name='info'), url('^upload/', UpLoadImageView.as_view(), name='upload'), url('^update/pwd/', UpdatePwdView.as_view(), name='update'), url('^sendemail_code/', SendPwdView.as_view(), name='sendemail_code'), ]
from django.conf.urls import url from users.views import UserInfoView, ChangePwdView, UserOrderView, UserWorkView, UserCourseView, UploadImageView urlpatterns = [ # 用户信息 url(r'info/$', UserInfoView.as_view(), name='info'), # 修改密码 url(r'change_pwd/$', ChangePwdView.as_view(), name='change_pwd'), # 用户头像上传 url(r'^image/upload/$', UploadImageView.as_view(), name="image_upload"), # 我的订单 url(r'order/$', UserOrderView.as_view(), name="order"), # 我的作业 url(r'homework/$', UserWorkView.as_view(), name="homework"), # 我的课程 url(r'course/$', UserCourseView.as_view(), name="course"), ]
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'), # 我的消息 ]
from django.conf.urls import url from django.urls import path from django.views.decorators.csrf import csrf_exempt from rest_framework_jwt.views import obtain_jwt_token from users import views # csrf_exempt 跨域访问,test from users.views import UserRouteView, UserRoleView, UserInfoView, LogoutView, OrganizationListView, \ OrganizationUserListView, OrganizationView, OrganizationUserView, ModifyPasswordView, UserPermissionView urlpatterns = [ # 登录接口 url('auth/login', csrf_exempt(views.LoginView.as_view())), # url(r'auth/login', csrf_exempt(obtain_jwt_token)), url('user/routes/$', UserRouteView.as_view(), name="user_routes"), path('user/info', UserInfoView.as_view(), name="user_info"), path('user/permission', UserPermissionView.as_view(), name="user_permission_info"), path('user/password/modify', ModifyPasswordView.as_view(), name="user_passwd_modify"), path('role', UserRoleView.as_view(), name="user_role"), path('auth/logout', LogoutView.as_view(), name="logout"), path('organization', OrganizationView.as_view(), name="org"), path('organization/list', OrganizationListView.as_view({"get": "list"}), name="org_list"), path('organization/user', OrganizationUserView.as_view(), name="org_user"), path('organization/user/list', OrganizationUserListView.as_view({"get": "list"}),
from users.views import UserInfoView, UploadImageView, UpdatePwdView from django.conf.urls import url, include urlpatterns = [ url(r'^usercenter-info/$', UserInfoView.as_view(), name="usercenter-info"), # 用户上传头像 url(r'^image/upload/$', UploadImageView.as_view(), name="image_upload"), url(r'^update/pwd/$', UpdatePwdView.as_view(), name="update_pwd"), ]
from django.conf.urls import url from rest_framework.routers import SimpleRouter from rest_framework_jwt.views import obtain_jwt_token from users import views from users.views import ChangeUserPassword, UserInfoView urlpatterns = [ url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$',views.SMSCodeView.as_view()), # url(r'^authorizations/$', views.AdminAuthorizeView.as_view()), url(r'^authorizations/$', obtain_jwt_token), url(r'^users/$', views.RegisterSerializer.as_view()), url(r'^users/like/(?P<pk>\d+)/$', views.Follow.as_view()), url(r'^user/password/$', ChangeUserPassword.as_view()), url(r'^user/$', UserInfoView.as_view()), ]
# encoding: utf-8 import django from users.views import UserInfoView, UploadImageView, SendEmailCodeView, UpdateEmailView, UpdatePwdView, MyCourseView, \ MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView __author__ = 'mtianyan' __date__ = '2018/1/14 0014 06:52' from django.urls import path app_name = "users" urlpatterns = [ # 用户信息 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( 'sendemail_code/', SendEmailCodeView.as_view(), name="sendemail_code"), path('update_email/', UpdateEmailView.as_view(), name="update_email"), # 用户中心我的课程 path('mycourse/', MyCourseView.as_view(), name="mycourse"), # 我收藏的课程机构 path('myfav/org/', MyFavOrgView.as_view(), name="myfav_org"), # 我收藏的授课讲师
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/3/23 23:13 # @Author : LiuShaoheng from django.conf.urls import url from users.views import UserInfoView, UploadImageView, SendEmailCodeView, UpdateEmailView, UpdatePwdView, MyCourseView, MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView app_name = "users" urlpatterns = [ # 用户信息 url('info/', UserInfoView.as_view(), name="user_info"), # 用户头像上传 url('image/upload/', UploadImageView.as_view(), name="image_upload"), # 用户个人中心修改密码 url('update/pwd/', UpdatePwdView.as_view(), name="update_pwd"), # 专用于发送验证码的 url('sendemail_code/', SendEmailCodeView.as_view(), name="sendemail_code"), url('update_email/', UpdateEmailView.as_view(), name="update_email"), # 用户中心我的课程 url('mycourse/', MyCourseView.as_view(), name="mycourse"), # 我收藏的课程机构 url('myfav/org/', MyFavOrgView.as_view(), name="myfav_org"), # 我收藏的授课讲师 url('myfav/teacher/', MyFavTeacherView.as_view(), name="myfav_teacher"), # 我收藏的课程 url('myfav/course/', MyFavCourseView.as_view(), name="myfav_course"), # 我的消息
# _*_ coding:utf-8 _*_ from django.conf.urls import url from users.views import RegisterView, LoginView, LogOutView, UserInfoView, AddressView, UserCenterOrderView urlpatterns = [ url(r'^register$', RegisterView.as_view(), name='register'), # 注册页面 url(r'^login$', LoginView.as_view(), name='login'), # 登录页面 url(r'^logout$', LogOutView.as_view(), name='logout'), # 登出 url(r'^$', UserInfoView.as_view(), name='user'), # 用户中心-信息页面 url(r'^address$', AddressView.as_view(), name='address'), # 用户中心-地址信息 url(r'^order/(?P<page>\d+)$', UserCenterOrderView.as_view(), name='order') ]
Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path from . import views from users.views import UserInfoView from movie.views import MovDetailView, MovieWithTagView, MovieWithStarView, MovieWithTimeWith urlpatterns = [ path('admin/', admin.site.urls), path('', views.index, name='index'), path('login/', views.login, name='login'), path('register/', views.register, name='register'), path('logout/', views.logout, name='logout'), path('user/', UserInfoView.as_view(), name='user'), path('play/<int:movie_id>/', MovDetailView.as_view(), name='play'), path('tag/<int:tag_id>/', MovieWithTagView.as_view(), name='movie_with_tag'), path('star/<int:star_id>', MovieWithStarView.as_view(), name='movie_with_star'), path('time/<int:add_time_id>', MovieWithTimeWith.as_view(), name='movie_with_time'), ]
from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from game.views import HomeView, TeamView from users import views as users_views from users.views import LoginView, RegisterView, UserInfoView, UserRulesView, UserHistoryView urlpatterns = [ url(r'^admin/', admin.site.urls), # 后台管理页面 # url(r'^captcha/', include('captcha.urls')), # 验证码 url(r'^$', LoginView.as_view(), name='log_in'), # 用户登录界面(主页) url(r'^register/$', RegisterView.as_view(), name='register'), # 用户注册页面 # url(r'^register/$', users_views.register, name='register'), # 用户注册页面 url(r'^user_center/info/$', UserInfoView.as_view(), name='user_info'), # 用户中心信息页面 url(r'^user_center/history/$', UserHistoryView.as_view(), name='user_history'), # 用户中心游戏历史页面 url(r'^user_center/rules/$', UserRulesView.as_view(), name='user_rules'), # 用户中心游戏规则页面 # url(r'^user_center/rules/$', users_views.usercenter_rules, name='user_rules'), # 用户中心游戏规则页面 url(r'^home$', HomeView.as_view(), name='home'), # 游戏大厅页面 url(r'^select_team/$', TeamView.as_view(), name='select_team'), # 组建队伍页面 url(r'^user_center/history/update/$', users_views.updateScore, name='updateScore'), # 更新数据 url(r'^user_center/history/update/$', users_views.gameOver, name='gameOver'), # 更新数据
# coding=utf-8 from users.views import UserInfoView, UploadImageView, UpdatePwdViw, \ SendEmailCodeView, UpdateEmailView, MyCourseView, MyFavOrgView, \ MyFavTeacherView, MyFavCourseView, MyessageView __author__ = 'lihao' __date__ = '2017/3/7 15:43' from django.conf.urls import url urlpatterns = [ url(r'^info/$', UserInfoView.as_view(), name='user_info'), url(r'^image/upload/$', UploadImageView.as_view(), name='up_load_image'), url(r'^update/pwd/$', UpdatePwdViw.as_view(), name='update_pwd'), url(r'^sendemail_code/$', SendEmailCodeView.as_view(), name='update_email'), 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/teacher/$', MyFavTeacherView.as_view(), name='myfav_teacher'), url(r'^myfav/course/$', MyFavCourseView.as_view(), name='myfav_course'), url(r'^mymessage$', MyessageView.as_view(), name='mymessage'), ]
from django.urls import re_path, path from django.views.generic import TemplateView from django.contrib.auth.decorators import login_required from users.views import UserInfoView, UploadImageView, ChangePwdView, ChangeMobileView, \ MyFavOrgView, MyFavTeahcerView, MyFavCourseView, MyMessageView urlpatterns = [ path("info/", UserInfoView.as_view(), name="info"), path("image/upload/", UploadImageView.as_view(), name="image"), path("update/pwd/", ChangePwdView.as_view(), name="upload_pwd"), path("update/mobile/", ChangeMobileView.as_view(), name="upload_mobile"), path("mycourse/", login_required( TemplateView.as_view(template_name="usercenter-mycourse.html"), login_url="/login/"), {"current_page": "mycourse"}, name="mycourse"), path("myfavorg/", MyFavOrgView.as_view(), name="myfavorg"), path("myfavteacher/", MyFavTeahcerView.as_view(), name="myfavteacher"), path("myfavcourse/", MyFavCourseView.as_view(), name="myfavcourse"), path("mymessages/", MyMessageView.as_view(), name="mymessages"), ]
# _*_ 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"),
# 登陆 path('login/', LoginView.as_view(), name='login'), # 账号激活 path('active/<slug:active_code>', ActiveView.as_view(), name='active'), # 退出登录 path('logout/', LogoutView.as_view(), name='logout'), # 忘记密码 path('forget_pwd', ForgetPwdView.as_view(), name='forget_pwd'), # 找回密码 path('find/<slug:find_code>', ResetView.as_view(), name='find'), # 修改密码 path('new_pwd/', NewPwdView.as_view(), name='new_pwd'), # 签到页面 path('check/', CheckView.as_view(), name='check'), # 设置页面 path('userinfo/<slug:info_type>', UserInfoView.as_view(), name='userinfo'), # 获取省市区信息 path('province/', ProvinceView.as_view(), name='province'), path('city_<int:pid>/', CityView.as_view(), name='city'), path('county_<int:pid>/', CountyView.as_view(), name='county'), # 修改个人信息 path('setting/<slug:setting_type>', SettingInfoView.as_view(), name='setting'), # 网站相关 # 主页 path('', IndexView.as_view(), name='index'), # 新闻 path('news/', include(('news.urls', 'news'))), # 旅游页面
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的图像文件加载路径
# -*- coding: utf-8 -*- from django.conf.urls import url from users.forms import AjaxChangeNickNameForm from users.views import UserInfoView, AvatarUploadView, AjaxChangeNickNameView, \ AjaxGetEmailVerificationView, AjaxUpdateEmailView, AjaxChangePasswordView, AjaxChangeMobileView, MyGroupView, \ GroupListView, GroupDetailView, AjaxJoinGroupView, AjaxLeaveGroupView, UserContactView, AjaxApproveJoinGroupView, \ AjaxApproveLeaveGroupView, AjaxRejectRequestView, AjaxCreateGroupView, AjaxApproveCreateGroupView, \ AjaxSetGroupBannerView, GroupChangeNameView, AjaxChangeStudentIdView urlpatterns = [ url(r'^profile/$', UserInfoView.as_view(), name="users.profile"), url(r'^contact/(?P<user_id>\d+)$', UserContactView.as_view(), name="users.contact"), # 编辑用户 url(r'^avatar/upload/$', AvatarUploadView.as_view(), name="user.avatar_upload"), url(r'^ajax-change-nick-name/$', AjaxChangeNickNameView.as_view(), name="user.ajax_change_nick_name"), url(r'^ajax-get-email-verification/$', AjaxGetEmailVerificationView.as_view(), name="user.ajax_get_email_verification"), url(r'^ajax-update-email/$', AjaxUpdateEmailView.as_view(), name="user.ajax_update_email"), url(r'^ajax-change-password/$', AjaxChangePasswordView.as_view(), name="user.ajax_change_password"), url(r'^ajax-change-mobile/$', AjaxChangeMobileView.as_view(), name="user.ajax_change_mobile"), # 用户组 url(r'^my-groups/$', MyGroupView.as_view(), name="user.my_groups"), url(r'^groups/$', GroupListView.as_view(), name="user.groups"), url(r'^groups/(?P<group_id>\d+)/$', GroupDetailView.as_view(), name="user.group_detail"), url(r'^ajax-group-change-name/(?P<group_id>\d+)/$', GroupChangeNameView.as_view(), name="user.group_change_name"), url(r'^ajax-join-group/$', AjaxJoinGroupView.as_view(), name="user.join_group"), url(r'^ajax-leave-group/$', AjaxLeaveGroupView.as_view(), name="user.leave_group"), url(r'^ajax-create-group/$', AjaxCreateGroupView.as_view(), name="user.create_group"), url(r'^ajax-approve-join-group/$', AjaxApproveJoinGroupView.as_view(), name="user.approve_join_group"), url(r'^ajax-approve-leave-group/$', AjaxApproveLeaveGroupView.as_view(), name="user.approve_leave_group"), url(r'^ajax-approve-create-group/$', AjaxApproveCreateGroupView.as_view(), name="user.approve_create_group"),