コード例 #1
0
ファイル: urls.py プロジェクト: azie-ginanjar/tees_test
from django.urls import path

from user.views import UserRegisterView, UserListView, UserDetailsView, UserUpdateView

urlpatterns = [
    path("", UserRegisterView.as_view(), name="user-register"),
    path("list", UserListView.as_view(), name="user-list"),
    path("<str:pk>/details", UserDetailsView.as_view(), name="user-details"),
    path("<str:pk>/update", UserUpdateView.as_view(), name="user-update"),
]
コード例 #2
0
from django.urls import path
from user.views import UserListView,UserCreateView,UserDeleteView,UserUpdateView,UserDetailView,UserLoginView,UserLogoutView
app_name = 'user'

urlpatterns = [
     path('usuarios',UserListView.as_view(),name = 'listar_usuarios'),
     path('criarusuario',UserCreateView.as_view(),name = 'criar_usuario'),
     path('usuarios/<int:pk>/apagar',UserDeleteView.as_view(),name = 'deletar_usuario'),
     path('usuarios/<int:pk>/editar',UserUpdateView.as_view(),name = 'editar_usuario'),
     path('usuarios/<int:pk>/detalhar',UserDetailView.as_view(),name = 'detalhar_usuario'),
     path('usuarios/login',UserLoginView.as_view(),name='logar_usuario'),
     path('usuarios/logout',UserLogoutView.as_view(),name = 'deslogar_usuario'),
]

コード例 #3
0
         PasswordChangeView.as_view(),
         name='password_change'),
    # password reset
    path('password_reset/', PasswordResetView.as_view(),
         name='password_reset'),
    path('reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(),
         name='password_reset_confirm'),
    path('reset/done/',
         PasswordResetCompleteView.as_view(),
         name='password_reset_complete'),

    # register
    path('register/',
         RegistrationView.as_view(),
         name='django_registration_register'),
    path('register/closed/',
         TemplateView.as_view(
             template_name="django_registration/registration_closed.html"),
         name='django_registration_disallowed'),
    path('activate/complete/',
         TemplateView.as_view(
             template_name="django_registration/activation_complete.html"),
         name='django_registration_activation_complete'),
    path('activate/<str:activation_key>/',
         ActivationView.as_view(success_url=reverse_lazy(
             "user:django_registration_activation_complete")),
         name='django_registration_activate'),
    path('profile/', UserUpdateView.as_view(), name='profile'),
]
コード例 #4
0
 def test_update_update_url_is_resolved(self):
     resolver = resolve('/user/profile-update/')
     self.assertEqual(resolver.func.__name__, UserUpdateView.as_view().__name__)
コード例 #5
0
ファイル: urls.py プロジェクト: Nimor111/django-user-service
from django.conf.urls import url

from user.views import (
    UserListView,
    UserDeleteView,
    UserCreateView,
    UserUpdateView,
    UserDetailView
)

app_name = 'user'

urlpatterns = [
    url(
        r'^update/(?P<email>[\w.@+-]+)/$',
        UserUpdateView.as_view(),
        name='update-user'
    ),
    url(
        r'^delete/(?P<email>[\w.@+-]+)/$',
        UserDeleteView.as_view(),
        name='delete-user'
    ),
    url(
        r'^create/$',
        UserCreateView.as_view(),
        name='create-user'
    ),
    url(
        r'^(?P<email>[\w.@+-]+)/$',
        UserDetailView.as_view(),
コード例 #6
0
""" urls for the user module (/user/*) """
from django.urls import path
from django.urls.conf import include
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView
from user.views import UserListView, UserCreateView, UserUpdateView, \
    UserDetailView, UserSettingsView, UserLoginView
from config import settings

urlpatterns = [
    path('', UserListView.as_view(), name='user_list'),
    path('new/', UserCreateView.as_view(), name='user_create'),
    path('<int:pk>/', UserDetailView.as_view(), name='user_detail'),
    path('update/', UserUpdateView.as_view(), name='user_update'),
    path('settings/', UserSettingsView.as_view(), name='user_settings'),
    path('pw/',
         PasswordChangeView.as_view(template_name='user/user_form.html'),
         name='user_pw'),
    path('login/', UserLoginView.as_view(), name='user_login'),
    path('logout/', LogoutView.as_view(), name='user_logout'),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
コード例 #7
0
"""Routes for authorization and registration, users."""

from django.urls import path

from user.views import (
    UserCreateView,
    UserDeleteView,
    UserLoginView,
    UserLogoutView,
    UsersListView,
    UserUpdateView,
)

urlpatterns = [
    path('login/', UserLoginView.as_view(), name='login'),
    path('logout/', UserLogoutView.as_view(), name='logout'),
    path('users/create/', UserCreateView.as_view(), name='user-create'),
    path('users/', UsersListView.as_view(), name='users-list'),
    path(
        'users/<int:pk>/update/', UserUpdateView.as_view(), name='user-update',
    ),
    path(
        'users/<int:pk>/delete/', UserDeleteView.as_view(), name='user-delete',
    ),
]
コード例 #8
0
ファイル: urls.py プロジェクト: jmbarbier/followdoc
# coding=utf-8
###############################################################################
# Copyright 2013 Jean-Matthieu BARBIER <*****@*****.**>
###############################################################################
# This file is part of FollowDoc
#
# FollowDoc is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FollowDoc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with FollowDoc.  If not, see <http://www.gnu.org/licenses/>
###############################################################################

from django.conf.urls import patterns, url
from user.views import UserListView, UserCreateView, UserDetailView, \
    UserLoginView, UserUpdateView
urlpatterns = patterns('',
    url(r'^$', UserListView.as_view(), name='user_list'),
    url(r'^_create/', UserCreateView.as_view(), name='user_create'),
    url(r'^(?P<pk>[\d]+)/$', UserDetailView.as_view(), name='user_detail'),
    url(r'^(?P<pk>[\d]+)/_update/$', UserUpdateView.as_view(), name='user_update'),
    url(r'login/$', UserLoginView.as_view(), name='main_login')
)
コード例 #9
0
"""patstavigais_darbs_11 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/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.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 user.views import UserListView, UserDetailView, UserAddView, UserUpdateView, UserDeleteView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', UserListView.as_view()),
    path('get_user/<int:pk>/', UserDetailView.as_view(), name='get_user'),
    path('add_user/', UserAddView.as_view(), name='add_user'),
    path('edit_user/<int:pk>/', UserUpdateView.as_view(), name='edit_user'),
    path('delete_user/<int:pk>/', UserDeleteView.as_view()),
]
コード例 #10
0
ファイル: urls.py プロジェクト: ikks/flisol-connect
    ),
    url(
        r'^password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
        'django.contrib.auth.views.password_reset_confirm',
        {
            'post_reset_redirect':
            reverse_lazy('user:password_reset_complete'),
            'set_password_form': CustomSetPasswordForm,
        },
        name='password_reset_confirm',
    ),
    url(
        r'^password/done/$',
        'django.contrib.auth.views.password_reset_complete',
        name='password_reset_complete',
    ),

    url(
        r'^suscribirse/$',
        UserRegistrationView.as_view(),
        name='registration',
    ),

    url(
        r'^actualizar/$',
        UserUpdateView.as_view(),
        name='profile_update',
    ),

)