from apps.users.views import UserInfoView, UploadImageView, UpdatePwdView, SendEmailCodeView, UpdateEmailView, \ MyCourseView, \ MyFavOrgView, MyFavCourseView, \ MyFavTeacherView, UserMessageView urlpatterns = [ # 课程机构列表页 # url(r'^list/$', OrgListView.as_view(), name='org_list'), # url(r'^add_ask/$', AddUserAskView.as_view(), name='add_ask'), # 用户信息 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='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'^message/$', UserMessageView.as_view(), name='user_message'),
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.core.urlresolvers import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.urls import path from apps.users.views import UserCenterInfoView, UpdateImageView, UpdatePwdView, UpdateEmailView, UserCenterCourseView from apps.users.views import UserCenterMsg, UserCenterMyFavOrg, UserCenterMyFavTea, UserCenterMyFavCou app_name = 'users' urlpatterns = [ path('info/', UserCenterInfoView.as_view(), name='info'), path('image/update', UpdateImageView.as_view(), name='image_update'), path('update/pwd', UpdatePwdView.as_view(), name='update_pwd'), path('update/email', UpdateEmailView.as_view(), name='update_email'), path('course', UserCenterCourseView.as_view(), name='my_course'), path('message', UserCenterMsg.as_view(), name='my_msg'), path('fav/org', UserCenterMyFavOrg.as_view(), name='my_fav_org'), path('fav/cou', UserCenterMyFavCou.as_view(), name='my_fav_cou'), path('fav/tea', UserCenterMyFavTea.as_view(), name='my_fav_tea'), ]
from apps.users.views import UpdateMobileView, MyFavOrgView, MyFavTeacherView, MyFavCourseView, UsersMessageView urlpatterns = [ path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('send_sms/', SendSmsView.as_view(), name='dend_sms'), path('mobilelogin', MobileLoginView.as_view(), name='mobilelogin'), path('register/', RegisterView.as_view(), name='register'), # 个人中心 url(r'^user_info$', UserInfoView.as_view(), name='user_info'), # 个人中心-个人资料 url(r'^upload_image$', UploadImageView.as_view(), name='upload_image'), # 个人中心-个人资料-修改头像 url(r'^upload_info$', UploadInfoView.as_view(), name='upload_info'), # 个人中心-个人资料修改 url(r'^update_pwd$', UpdatePwdView.as_view(), name='update_pwd'), # 个人中心-个人资料密码修改 url(r'^update_mobile$', UpdateMobileView.as_view(), name='update_mobile'), # 个人中心-个人资料手机号修改 # 我的课程 url(r'^mycourse$', login_required( TemplateView.as_view(template_name='usercenter-mycourse.html')), kwargs={'active': 'mycourse'}, name='mycourse'), # 我的收藏 url(r'^fav_org$', MyFavOrgView.as_view(), name='fav_org'), # 我的收藏-课程机构 url(r'^fav_teacher$', MyFavTeacherView.as_view(), name='fav_teacher'), # 我的收藏-授课教师