コード例 #1
0
from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView

from account.views import (
    RegisterView,
    ActivationView,
    UserActivityView,
    LoginView,
    ChangePasswordView,
    ForgotPasswordView,
    CreateNewPasswordView,
    ProfileViewSet,
)

user_detail = ProfileViewSet.as_view(
    {"get": "retrieve", "put": "update", "patch": "partial_update"}
)

urlpatterns = [
    path("register/", RegisterView.as_view()),
    path("activate/<uuid:activation_code>/", ActivationView.as_view()),
    path("login/", LoginView.as_view()),
    path("refresh_token/", TokenRefreshView.as_view()),
    path("activity/", UserActivityView.as_view()),
    path("change_password/", ChangePasswordView.as_view()),
    path("reset_password/", ForgotPasswordView.as_view()),
    path("reset_password_confirm/", CreateNewPasswordView.as_view()),
    path("profile/", user_detail),
]
コード例 #2
0
ファイル: urls.py プロジェクト: zeus911/devops-2
from django.views.generic import TemplateView

from account.views import SignupView, LoginView, LogoutView, DeleteView
from account.views import ConfirmEmailView
from account.views import ChangePasswordView, PasswordResetView, \
    PasswordResetTokenView
from account.views import SettingsView

urlpatterns = patterns(
    "",
    url(r"^signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^login/$", LoginView.as_view(), name="account_login"),
    url(r"^logout/$", LogoutView.as_view(), name="account_logout"),
    url(r"^confirm_email/(?P<key>\w+)/$",
        ConfirmEmailView.as_view(),
        name="account_confirm_email"),
    url(r"^password/$", ChangePasswordView.as_view(), name="account_password"),
    url(r"^password/reset/$",
        PasswordResetView.as_view(),
        name="account_password_reset"),
    url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$",
        PasswordResetTokenView.as_view(),
        name="account_password_reset_token"),
    url(r"^settings/$", SettingsView.as_view(), name="account_settings"),
    url(r"^delete/$", DeleteView.as_view(), name="account_delete"),
)

handler403 = TemplateView.as_view(template_name="403.html")
handler404 = TemplateView.as_view(template_name="404.html")
handler500 = TemplateView.as_view(template_name="500.html")
コード例 #3
0
ファイル: urls.py プロジェクト: tonyyu/pybbm
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

try:
    from django.conf.urls import patterns, include, url
except ImportError:
    from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from test.example_thirdparty.forms import SignupFormWithCaptcha

admin.autodiscover()

from account.views import ChangePasswordView, SignupView, LoginView

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),

    # aliases to match original django-registration urls
    url(r"^accounts/password/$",
        ChangePasswordView.as_view(),
        name="auth_password_change"),
    url(r"^accounts/signup/$",
        SignupView.as_view(form_class=SignupFormWithCaptcha),
        name="registration_register"),
    url(r"^accounts/login/$", LoginView.as_view(), name="auth_login"),
    url(r'^accounts/', include('account.urls')),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^', include('pybb.urls', namespace='pybb')),
)
コード例 #4
0
ファイル: urls.py プロジェクト: hovel/pybbm
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from account.views import ChangePasswordView, SignupView, LoginView
from django.conf.urls import include, url
from django.contrib import admin
from example_thirdparty.forms import SignupFormWithCaptcha

urlpatterns = [
    url(r"^admin/", include(admin.site.urls)),
    # aliases to match original django-registration urls
    url(r"^accounts/password/$", ChangePasswordView.as_view(), name="auth_password_change"),
    url(r"^accounts/signup/$", SignupView.as_view(form_class=SignupFormWithCaptcha), name="registration_register"),
    url(r"^accounts/login/$", LoginView.as_view(), name="auth_login"),
    url(r"^accounts/", include("account.urls")),
    url(r"^captcha/", include("captcha.urls")),
    url(r"^", include("pybb.urls", namespace="pybb")),
]
コード例 #5
0
ファイル: urls.py プロジェクト: Amechi101/indieapp
from __future__ import unicode_literals

from django.conf.urls import patterns, url

from account.views import SignupView, LoginView, LogoutView, DeleteView
from account.views import ConfirmEmailView
from account.views import ChangePasswordView, PasswordResetView, PasswordResetTokenView
from account.views import SettingsView

urlpatterns = patterns("",
    url(r"^signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^login/$", LoginView.as_view(), name="account_login"),
    url(r"^logout/$", LogoutView.as_view(), name="account_logout"),
    url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"),
    url(r"^password/$", ChangePasswordView.as_view(), name="account_password"),
    url(r"^password/reset/$", PasswordResetView.as_view(), name="account_password_reset"),
    url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", PasswordResetTokenView.as_view(), name="account_password_reset_token"),
    url(r"^settings/$", SettingsView.as_view(), name="account_settings"),
    url(r"^delete/$", DeleteView.as_view(), name="account_delete"),
)
コード例 #6
0
ファイル: urls.py プロジェクト: niamoto/niamoto-portal
# coding: utf-8

from django.conf.urls import url
from django.views.generic import TemplateView
from account.views import LoginView, LogoutView, DeleteView
from account.views import ConfirmEmailView
from account.views import ChangePasswordView, PasswordResetView, PasswordResetTokenView

from web.views import SettingsView
from web.views import home, SignupView


urlpatterns = [
    url(r"^$", home, name="home"),
    url(r"^about/$", TemplateView.as_view(template_name="about_page.html"), name="about"),
    url(r"^team/$", TemplateView.as_view(template_name="team_page.html"), name="team"),
    url(r"^contact/$", TemplateView.as_view(template_name="contact_page.html"), name="contact"),
    # Rewrite account urls
    url(r"^account/signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^account/login/$", LoginView.as_view(), name="account_login"),
    url(r"^account/logout/$", LogoutView.as_view(), name="account_logout"),
    url(r"^account/confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"),
    url(r"^account/settings/$", SettingsView.as_view(), name="account_settings"),
    url(r"^account/settings/password/$", ChangePasswordView.as_view(), name="account_password"),
    url(r"^account/settings/password/reset/$", PasswordResetView.as_view(), name="account_password_reset"),
    url(r"^account/settings/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", PasswordResetTokenView.as_view(), name="account_password_reset_token"),
    url(r"^account/settings/delete/$", DeleteView.as_view(), name="account_delete"),
]
コード例 #7
0
                               PasswordResetView, PasswordResetTokenView,
                               SettingsView)

    urlpatterns += i18n_patterns(
        "",
        url(_(r"^signup/$"), SignupView.as_view(),
            name="account_signup"),
        # original is: url(_(r"^login/$"), but we prefer:
        url(_(ur'^signin/$'), never_cache(LoginView.as_view()),
            name="signin"),
        # original is: url(_(r"^logout/$"), but we prefer:
        url(_(ur'^signout/$'), never_cache(LogoutView.as_view()),
            name="signout"),
        url(_(r"^confirm_email/(?P<key>\w+)/$"), ConfirmEmailView.as_view(),
            name="account_confirm_email"),
        url(_(r"^password/$"), ChangePasswordView.as_view(),
            name="account_password"),
        url(_(r"^password/reset/$"), PasswordResetView.as_view(),
            name="account_password_reset"),
        url(_(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$"),
            PasswordResetTokenView.as_view(),
            name="account_password_reset_token"),
        url(_(r"^settings/$"), SettingsView.as_view(),
            name="account_settings"),
        url(_(r"^delete/$"), DeleteView.as_view(),
            name="account_delete"),
    )

    # As an alternative, we could have used one indirection level,
    # but it's not satisfying because of the non-i18n nature of
    # account's URLs.
コード例 #8
0
ファイル: urls.py プロジェクト: datajockey/pybbm
# -*- coding: utf-8 -*-
try:
    from django.conf.urls import patterns, include, url
except ImportError:
    from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin

admin.autodiscover()

from account.views import ChangePasswordView, SignupView, LoginView

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('account.urls')),

    # aliases to match original django-registration urls
    url(r"^accounts/password/$", ChangePasswordView.as_view(), name="auth_password_change"),
    url(r"^accounts/signup/$", SignupView.as_view(), name="registration_register"),
    url(r"^accounts/login/$", LoginView.as_view(), name="auth_login"),

    url(r'^', include('pybb.urls', namespace='pybb')),
)
コード例 #9
0
ファイル: urls.py プロジェクト: albinatursunova/sweet_api
from django.urls import path, include

from account.views import (RegistrationView, ActivationView, LoginView,
                           LogoutView, ChangePasswordView)

urlpatterns = [
    path('register/', RegistrationView.as_view()),
    path('activation/', ActivationView.as_view()),
    path('login/', LoginView.as_view()),
    path('logout/', LogoutView.as_view()),
    path('change-password/', ChangePasswordView.as_view()),
    path('password_reset/', include('django_rest_passwordreset.urls')),
]
コード例 #10
0
ファイル: urls.py プロジェクト: Kenan7/django-user-accounts
from django.urls import path, re_path
from account.views import (
    ChangePasswordView,
    ConfirmEmailView,
    DeleteView,
    LoginView,
    LogoutView,
    PasswordResetTokenView,
    PasswordResetView,
    SettingsView,
    SignupView,
)

urlpatterns = [
    path('signup/', SignupView.as_view(), name="account_signup"),
    path('login/', LoginView.as_view(), name="account_login"),
    path('logout/', LogoutView.as_view(), name="account_logout"),
    re_path(r'^confirm_email/(?P<key>\w+)/$',
            ConfirmEmailView.as_view(),
            name="account_confirm_email"),
    path('password/', ChangePasswordView.as_view(), name="account_password"),
    path('password/reset/',
         PasswordResetView.as_view(),
         name="account_password_reset"),
    re_path(r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
            PasswordResetTokenView.as_view(),
            name="account_password_reset_token"),
    path('settings/', SettingsView.as_view(), name="account_settings"),
    path('delete/', DeleteView.as_view(), name="account_delete"),
]
コード例 #11
0
ファイル: urls.py プロジェクト: chrisv2/pybbm
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import django
from account.views import ChangePasswordView, SignupView, LoginView
from django.conf.urls import include, url
from django.contrib import admin
from example_thirdparty.forms import SignupFormWithCaptcha

urlpatterns = [
    url(r'^admin/', include(admin.site.urls) if django.VERSION < (1, 10) else admin.site.urls),

    # aliases to match original django-registration urls
    url(r"^accounts/password/$", ChangePasswordView.as_view(),
        name="auth_password_change"),
    url(r"^accounts/signup/$",
        SignupView.as_view(form_class=SignupFormWithCaptcha),
        name="registration_register"),
    url(r"^accounts/login/$", LoginView.as_view(), name="auth_login"),

    url(r'^accounts/', include('account.urls')),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^', include('pybb.urls', namespace='pybb')),
]
コード例 #12
0
        name='pgp-interstitial'),
    url(r'^public-data-api/$',
        views.PublicDataDocumentationView.as_view(),
        name='public-data-api'),

    # Override to use custom form and view with added fields and methods.
    url(r'^account/signup/$', account_views.MemberSignupView.as_view(),
        name='account_signup'),

    # Override to check that the user has a Member role.
    url(r'^account/login/$', account_views.MemberLoginView.as_view(),
        name='account_login'),

    # More overrides - custom forms to enforce password length minimum.
    url(r'^account/password/$',
        ChangePasswordView.as_view(form_class=ChangePasswordForm),
        name='account_password'),

    url(r'^account/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
        PasswordResetTokenView.as_view(form_class=PasswordResetTokenForm),
        name='account_password_reset_token'),

    # django-account's built-in delete uses a configurable expunge timer,
    # let's just do it immediately and save the complexity
    url(r'^account/delete/$',
        account_views.UserDeleteView.as_view(),
        name='account_delete'),

    # Custom view for prompting login when performing OAuth2 authorization
    url(r'^account/login/oauth2/$', views.OAuth2LoginView.as_view(),
        name='account-login-oauth2'),
コード例 #13
0
ファイル: urls.py プロジェクト: pybest/pybbm
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from account.views import ChangePasswordView, SignupView, LoginView
from django.conf.urls import include, url
from django.contrib import admin
from example_thirdparty.forms import SignupFormWithCaptcha

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),

    # aliases to match original django-registration urls
    url(r"^accounts/password/$", ChangePasswordView.as_view(),
        name="auth_password_change"),
    url(r"^accounts/signup/$",
        SignupView.as_view(form_class=SignupFormWithCaptcha),
        name="registration_register"),
    url(r"^accounts/login/$", LoginView.as_view(), name="auth_login"),

    url(r'^accounts/', include('account.urls')),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^', include('pybb.urls', namespace='pybb')),
]
コード例 #14
0
from django.urls import path, include
from rest_framework import routers

from account.views import registration_view, Logout, ChangePasswordView, AccountViewSet
from rest_framework.authtoken.views import obtain_auth_token

app_name = 'account'

router = routers.DefaultRouter()

router.register(r'accounts', AccountViewSet, basename='accounts')

urlpatterns = [
    path('register', registration_view),
    path('login', obtain_auth_token),
    path('logout', Logout.as_view()),
    path('change_password', ChangePasswordView.as_view()),
    path('', include(router.urls))
]