Exemple #1
0
    #查看个人信息
    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( 'mymessage/', MyMessageView.as_view(), name='mymessage' ),
]
# _*_ coding:utf-8 _*_
from django.conf.urls import url, include

from users.views import UsercenterInfoView, ImageUploadView, UpdatePwdView, SendEmailCodeView, UpdateEmailView, \
    MyCourseView, MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView

urlpatterns = [
    url(r'^usercenter_info/$',
        UsercenterInfoView.as_view(),
        name="usercenter_info"),
    url(r'^image/upload/$', ImageUploadView.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/orgs/$', MyFavOrgView.as_view(), name="myfav_org"),
    url(r'^myfav/teachers/$', MyFavTeacherView.as_view(),
        name="myfav_teacher"),
    url(r'^myfav/courses/$', MyFavCourseView.as_view(), name="myfav_course"),

    # 我的消息
    url(r'^mymessages/$', MyMessageView.as_view(), name="mymessages"),
]
Exemple #3
0
    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'),
]
Exemple #4
0
from django.conf.urls import url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from users.views import UserInfoView, UploadImageView, ChangePwdView, ChangeMobileView
from users.views import MyCourseView, MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView

urlpatterns = [
    url(r'^info/$', UserInfoView.as_view(), name="info"),
    url(r'^image/upload/$', UploadImageView.as_view(), name="image"),
    url(r'^update/pwd/$', ChangePwdView.as_view(), name="update_pwd"),
    url(r'^update/mobile/$', ChangeMobileView.as_view(), name="update_mobile"),
    # 两种方法实现对我的课程的访问
    # url(r'^mycourse/$', MyCourseView.as_view(), name="mycourse"),
    url(r'^mycourse/$', login_required(TemplateView.as_view(template_name="usercenter-mycourse.html"),
                                       login_url="/login/"), {"current_page": "mycourse"}, name="mycourse"),
    url(r'^myfavorg/$', MyFavOrgView.as_view(), name="myfavorg"),
    url(r'^myfav_teacher/$', MyFavTeacherView.as_view(), name="myfav_teachers"),
    url(r'^myfav_course/$', MyFavCourseView.as_view(), name="myfav_course"),
    url(r'^messages/$', MyMessageView.as_view(), name="messages"),
]
from django.conf.urls import url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required

from users.views import UserInfoView, UploadImageView, ChangePwdView, ChangeMobileView
from users.views import MyMessageView, MyFavOrgView, MyFavTeacherView, MyFavCourseView

urlpatterns = [
    url(r'^info/$', UserInfoView.as_view(), name="info"),
    url(r'^image/upload/$', UploadImageView.as_view(), name="image"),
    url(r'^update/pwd/$', ChangePwdView.as_view(), name="update_pwd"),
    url(r'^update/mobile/$', ChangeMobileView.as_view(), name="update_mobile"),
    url(r'^mycourse/$',
        login_required(
            TemplateView.as_view(template_name="usercenter-mycourse.html"),
            login_url="/login/"), {"current_page": "mycourse"},
        name="mycourse"),
    url(r'^myfavorg/$', MyFavOrgView.as_view(), name="myfavorg"),
    url(r'^myfav_teacher/$', MyFavTeacherView.as_view(),
        name="myfav_teachers"),
    url(r'^myfav_course/$', MyFavCourseView.as_view(), name="myfav_course"),
    url(r'^messages/$', MyMessageView.as_view(), name="messages"),
]
Exemple #6
0
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 #7
0
    # 用户信息
    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'my_message/$', MyMessageView.as_view(), name="my_message"),
]
Exemple #8
0
urlpatterns = [
    #用户信息
    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/$", SendMailCode.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"),
]
Exemple #9
0
from users.views import UserInfoView, UploadImageView, UpdatePwdView, SendEmailCodeView, MyCourseView, MyFavOrgView, \
    MyFavTeacherView, MyMessageView, LogoutView

urlpatterns = [
    # 用户信息页面
    url(r'^info/$', UserInfoView.as_view(), name='info'),
    # 上传头像
    url(r'^image/upload', UploadImageView.as_view(), name='image_upload'),
    # 修改密码
    url(r'^update/pwd', UpdatePwdView.as_view(), name='pwd_update'),
    # 发送邮箱验证码
    url(r'^sendEmail_code', SendEmailCodeView.as_view(),
        name='sendEmail_code'),
    # 修改邮箱
    url(r'^updateEmail', SendEmailCodeView.as_view(), name='updateEmail'),
    # 我的课程
    url(r'^my_course/$', MyCourseView.as_view(), name='my_course'),
    # 我收藏的机构
    url(r'^my_fav/org/$', MyFavOrgView.as_view(), name='my_fav_org'),
    # 我收藏的讲师
    url(r'^my_fav/teacher/$',
        MyFavTeacherView.as_view(),
        name='my_fav_teacher'),
    # 我收藏的课程
    url(r'^my_fav/course/$', MyFavTeacherView.as_view(), name='my_fav_course'),
    # 我收藏的课程
    url(r'^my_message/$', MyMessageView.as_view(), name='my_message'),
    # 用户登出
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
]
Exemple #10
0
# _*_ encoding:utf-8 _*_
from django.conf.urls import url
from users.views import LoginView,LogoutView,RegisterView,ActiveUserView,IndexView\
    ,ForgetPWView,FindPWCordView,UserInfoView,NickNameView,WorkNameView,UploadImageView,MyCourseView,\
    DeleteMyCourseView,MyFavCouresView,MyFavTeacherView,MyPhoneView
__author__ = 'YZF'
__date__ = '2018/3/14,16:26'
urlpatterns = [
    url(r'^login/', LoginView.as_view(), name='login'),
    url(r'^register/', RegisterView.as_view(), name='register'),
    # url(r'forget/(?P<email>.*)*/',ForgetPWView.as_view(),name='forget'),
    url(r'^forget/', ForgetPWView.as_view(), name='forget'),
    url(r'^logout/', LogoutView.as_view(), name='logout'),
    url(r'^forget_cord/', FindPWCordView.as_view(), name='forgetcord'),
    # 激活用户url
    url('^active/(?P<active_code>.*)/',
        ActiveUserView.as_view(),
        name="user_active"),
    url('^info/', UserInfoView.as_view(), name="user_info"),
    url('^nickname/', NickNameView.as_view(), name="info_nickname"),
    url('^phone/', MyPhoneView.as_view(), name="info_phone"),
    url('^workname/', WorkNameView.as_view(), name="info_workname"),
    url(r'^mycourses/', MyCourseView.as_view(), name='info_courses'),
    url(r'^favteacher/', MyFavTeacherView.as_view(), name='fav_teacher'),
    url(r'^myfav/', MyFavCouresView.as_view(), name='info_myfav'),
    url('^delete/(?P<course_id>.*)/',
        DeleteMyCourseView.as_view(),
        name="course_delete"),
    url(r'^uploadoimg/', UploadImageView.as_view(), name='image_upload'),
]
Exemple #11
0
# , UpdatePwdView

from users.views import 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/', 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'^my_course/', MyCourseView.as_view(), name="my_course"),
    # ----------我收藏的机构--------------
    url(r'^fav/org/', MyFavOrgView.as_view(), name="fav_org"),
    # ----------收藏的课程--------------------
    url(r'^fav/course/', MyFavCourseView.as_view(), name="fav_course"),
    # -----------收藏的讲师-----------------------
    url(r'^fav/teacher/', MyFavTeacherView.as_view(), name="fav_teacher"),
    # -----------我的消息-----------------------
    url(r'^my/message/', MyMessageView.as_view(), name="my_message")
]
@Time    : 18-11-13 上午11:22
@Author  : TX
@File    : urls.py
@Software: PyCharm
"""
from django.urls import path, re_path

from 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"),  # 我的消息
]