コード例 #1
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")
コード例 #2
0
            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.
    #
    # lambda r: HttpResponseRedirect(reverse_lazy('account_login')),
    # name='signin'),
    # lambda r: HttpResponseRedirect(reverse_lazy('account_logout')),
    # name='signout'),

else:
    # In case we do not have the django-user-accounts application,
    # We can still provide basic templates and features, notably
コード例 #3
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"),
)
コード例 #4
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"),
]
コード例 #5
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"),
]
コード例 #6
0
    # path('about', views.about, name="about"),
    path('register', registration_view, name="register"),
    path('login', login_view, name="login"),
    path('logout', logout_view, name="logout"),
    path('find_donor', views.find_donor, name="find_donor"),
    path('find_blood_banks', views.find_blood_banks, name="find_blood_banks"),
    # path('facts', views.facts, name="facts"),
    path('can_donate', views.can_donate, name="can_donate"),
    path('contribution', views.contribution, name="contribution"),
    path('feedback', views.feedback, name="feedback"),
    path('volunteers&technicalTeam',
         views.volunteers_technicalTeam,
         name="volunteers&technicalTeam"),
    path('dashboard', dashboard_view, name="dashboard"),
    path('<int:pk>/delete',
         DeleteView.as_view(template_name='account/delete.html'),
         name="delete"),
    path('load-cities/', load_cities, name="load_cities"),

    # Password reset urls
    path('password_change/done/',
         auth_views.PasswordChangeDoneView.as_view(
             template_name='registration/password_change_done.html'),
         name='password_change_done'),
    path('password_change/',
         auth_views.PasswordChangeView.as_view(
             template_name='registration/password_change.html'),
         name='password_change'),
    path('password_reset/done/',
         auth_views.PasswordResetCompleteView.as_view(
             template_name='registration/password_reset_done.html'),
コード例 #7
0
        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"),
]
コード例 #8
0
ファイル: urls.py プロジェクト: mrseadev/django-user-accounts
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"),
    path("confirm_email/<str:key>/",
         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"),
    path("password/reset/<str:uidb36>/<str: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"),
]