コード例 #1
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"),
)
コード例 #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 プロジェクト: 1flow/1flow
        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.
    #
    # lambda r: HttpResponseRedirect(reverse_lazy('account_login')),
    # name='signin'),
    # lambda r: HttpResponseRedirect(reverse_lazy('account_logout')),
    # name='signout'),
コード例 #4
0
ファイル: urls.py プロジェクト: Noisyfox/LMS
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView

from LMS import views

urlpatterns = [
    url(r"^$", TemplateView.as_view(template_name="homepage.html"), name="home"),
    url(r"^admin/", include([
        url(r'^misc/', admin.site.urls),
        url(r'^', include('LMS_Admin.urls')),
    ])),
    url(r"^stu/", include("LMS_Student.urls")),
    url(r"^lec/", include("LMS_Teacher.urls")),
    url(r"^account/", include([
        url(r"^signup/$", SignupView.as_view(), name="account_signup"),
        url(r"^login/$", views.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"),
    ])),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
コード例 #5
0
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
    # 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'),

    # This has to be after the overriden account/ URLs, not before
    url(r'^account/', include('account.urls')),
コード例 #7
0
ファイル: urls.py プロジェクト: nadavperetz/MeneEduca
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"),
)