Exemple #1
0
from django.urls import path
from users.views import UserListView, UserLoginView, UserLogoutView, UserSignUpView, UserDetailView

app_name = 'users'

urlpatterns = [
    path('list', UserListView.as_view(), name='list_users'),
    path('login', UserLoginView.as_view(), name='login_users'),
    path('logout', UserLogoutView.as_view(), name='logout_users'),
    path('signup', UserSignUpView.as_view(), name='signup_users'),
    path('users/<int:pk>/detalhes',
         UserDetailView.as_view(),
         name='detail_users'),
]
Exemple #2
0
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from django.views.generic import TemplateView

from users.views import UserJoinView, UserLoginView, UserLogoutView
from contents.views import HomeView, GramAddView

urlpatterns = [
    path("s/a/console/", admin.site.urls),
    path("", HomeView.as_view()),
    path("login/", TemplateView.as_view(template_name="login.html")),
    path("join/", TemplateView.as_view(template_name="join.html")),
    path("api/users/", UserJoinView.as_view()),
    path("api/login/", UserLoginView.as_view()),
    path("api/logout/", UserLogoutView.as_view()),
    path("api/contents/", GramAddView.as_view()),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #3
0
from django.urls import path
from users.views import (
    ProfileView,
    ProfileEditView,
    UserLoginView,
    UserLogoutView,
    UserSignupView,
    FollowUserView,
    FollowersUserView,
)

app_name = 'users'

urlpatterns = [
    path('perfil/<int:pk>/', ProfileView.as_view(), name="profile"),
    path('perfil/<int:pk>/editar/',
         ProfileEditView.as_view(),
         name="profile-edit"),
    path('login/', UserLoginView.as_view(), name="login"),
    path('logout/', UserLogoutView.as_view(), name="logout"),
    path('signup/', UserSignupView.as_view(), name="signup"),
    path('seguir/<int:pk>', FollowUserView.as_view(), name="seguir"),
    path('perfil/<int:pk>/seguidores',
         FollowersUserView.as_view(),
         name="seguidores"),
]

#users(app_name):profile(name)
Exemple #4
0
    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, include
from django.contrib import admin
from users.views import IndexShowView, UserLoginView, UserLogoutView, UserRegisterView, UserActiveView, ForgetPwdView, PassWordReserView, ModifyPwdView
from django.conf import settings
from django.views.static import serve
import xadmin

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^index/$', IndexShowView.as_view(), name='index'),
    url(r'^media/(?P<path>.*)$', serve,
        {'document_root': settings.MEDIA_ROOT}),
    url(r'^login/$', UserLoginView.as_view(), name='login'),
    url(r'^logout/$', UserLogoutView.as_view(), name='logout'),
    url(r'^register/$', UserRegisterView.as_view(), name='register'),
    url(r'^captcha/', include('captcha.urls')),
    # 将任意active后面的值取出,复制给code,传递给后端
    url(r'^active/(?P<code>.*)$', UserActiveView.as_view(), name='active'),
    url(r'^forgetpwd/$', ForgetPwdView.as_view(), name='forgetpwd'),
    url(r'^reset/(?P<code>.*)$', PassWordReserView.as_view(), name='resetpwd'),
    url(r'^modify/$', ModifyPwdView.as_view(), name='modify_pwd'),

    # 课程机构urls分发
    url(r'^org/', include('organation.urls', namespace='org')),
]
Exemple #5
0
from django.urls import path

from users.views import UserLoginView, UserLogoutView, RegisterView, ProfileView

app_name = 'users'

urlpatterns = [
    path('login/', UserLoginView.as_view(), name='login'),
    path('logout/', UserLogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='register'),
    path('profile/', ProfileView.as_view(), name='profile'),
]
Exemple #6
0
from django.urls import path, include
from users.views import ProfileView, ProfileEditView, UserLoginView, \
                        UserLogoutView, UserSignupView

app_name = 'users'

urlpatterns = [
    path('perfil/<int:pk>/', ProfileView.as_view(), name='profile'),
    path('perfil/<int:pk>/editar/', ProfileEditView.as_view(), name='profile-edit'),
    path('login/', UserLoginView.as_view(), name="login"),
    path('logout/', UserLogoutView.as_view(), name="logout"),
    path('cadastro/', UserSignupView.as_view(), name='signup'),
]
Exemple #7
0
from django.urls import path
from users.views import UserListView, UserLoginView, UserLogoutView, UserRegisterView, UserSobreView

app_name = 'users'

urlpatterns = [
    path('list', UserListView.as_view(), name='list_users'),
    path('login', UserLoginView.as_view(), name='login_user'),
    path('sair', UserLogoutView.as_view(), name='logout_user'),
    path('cadastro', UserRegisterView.as_view(), name='register_user'),
    path('usuario/<int:pk>', UserSobreView.as_view(), name='sobre_user')
]
Exemple #8
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from users.views import UserLogin, RegisterView, Activeuserview, UserLogoutView, IndexView
import xadmin
from django.views.generic import TemplateView
from orgnization.views import Orglistview, TeacherlistView
from django.views.static import serve
from s1mxonline.settings import MEDIA_ROOT
urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^index/', IndexView.as_view(), name="index"),
    url(r'^login/', UserLogin.as_view(), name="login"),
    # 退出登录
    url(r'^logout/', UserLogoutView.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="active"),
    #     配置个人中心页面
    url(r'^user/', include("users.urls", namespace="user")),
    # 机构相关URL配置
    url(r'^orglistr/', include("orgnization.urls", namespace="org")),
    # 课程相关URL的配置
    url(r'^courses/', include("courses.urls", namespace="courses")),

    #  导入静态文件的处理方法
    url(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}),
Exemple #9
0
    path("search", SearchView.as_view(), name="search-page"),
    path("login/", UserLoginView.as_view(), name="login-page"),
    path("register/", UserRegisterView.as_view(), name="register-page"),
    re_path(
        r"^activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$",
        UserActivationEmailView.as_view(),
        name="activate-email-link",
    ),
    path(
        "re-send-activation-link/<str:username>",
        UserReSendActivationEmailView.as_view(),
        name="re-send-activate-email-link",
    ),
    path("profile/", UserDetailView.as_view(), name="profile-page"),
    path("update/", UserUpdateView.as_view(), name="update-page"),
    path("logout/", UserLogoutView.as_view(), name="logout-page"),
    path("changepassword/",
         UserChangePasswordView.as_view(),
         name="changepassword-page"),
    path(
        "reset_password/",
        UserForgotPasswordView.as_view(),
        name="send-reset-password-page",
    ),
    re_path(
        r"^reset_password/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$",
        UserResetForgotPasswordView.as_view(),
        name="reset-password-page",
    ),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #10
0
from django.conf.urls import url
from users.views import (
    UserProfileView, UserLoginView, UserLogoutView, UserRegisterView
)


urlpatterns = [
    url(
        r'^login/$',
        UserLoginView.as_view(),
        name='login'
    ),
    url(
        r'^logout/$',
        UserLogoutView.as_view(),
        name='logout'
    ),
    url(
        r'^register/$',
        UserRegisterView.as_view(),
        name='register'
    ),
    url(
        r'^(?P<username>[\w-]+)/$',
        UserProfileView.as_view(),
        name='profile'
    ),
]