Exemple #1
0
from django.urls import path, include, re_path
from apps.users.views import UserinfoView, UploadImageView, UpdatePwdView, SendEmailCodeView, UpdateEmailView, \
    MyCourseView, MyFavOrgView, MyFavTeacherView,MyFavCourseView,MyMessageView

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"),
    # 我的收藏--授课讲师
    path('myfav/teacher/', MyFavTeacherView.as_view(), name="myfav_teacher"),
    #我的收藏--课程
    path('myfav/course/', MyFavCourseView.as_view(), name="myfav_course"),
    #我的消息
    path('my_message/', MyMessageView.as_view(), name="my_message"),
]
Exemple #2
0
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'),
]
Exemple #3
0
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'),

    # 机构收藏
    # url(r'^add_fav/$', AddFavView.as_view(), name='add_fav'),
    #
    # # 讲师列表页