except ImportError:
    # patterns is unavailable in Django 1.10+
    patterns = False

from password_policies.views import (
    PasswordChangeDoneView,
    PasswordChangeFormView,
    PasswordResetCompleteView,
    PasswordResetConfirmView,
    PasswordResetDoneView,
    PasswordResetFormView,
)

urlpatterns = [
    url(r"^change/done/$",
        PasswordChangeDoneView.as_view(),
        name="password_change_done"),
    url(r"^change/$", PasswordChangeFormView.as_view(),
        name="password_change"),
    url(r"^reset/$", PasswordResetFormView.as_view(), name="password_reset"),
    url(
        r"^reset/complete/$",
        PasswordResetCompleteView.as_view(),
        name="password_reset_complete",
    ),
    url(
        r"^reset/confirm/([0-9A-Za-z_\-]+)/([0-9A-Za-z]{1,13})/([0-9A-Za-z-=_]{1,128})/$",
        PasswordResetConfirmView.as_view(),
        name="password_reset_confirm",
    ),
    url(r"^reset/done/$",
Пример #2
0
from django.conf.urls import patterns, url

from password_policies.views import PasswordChangeFormView
from password_policies.views import PasswordChangeDoneView
from password_policies.views import PasswordResetCompleteView
from password_policies.views import PasswordResetConfirmView
from password_policies.views import PasswordResetFormView
from password_policies.views import PasswordResetDoneView


urlpatterns = patterns(
    "",
    url(r"^change/done/$", PasswordChangeDoneView.as_view(), name="password_change_done"),
    url(r"^change/$", PasswordChangeFormView.as_view(), name="password_change"),
    url(r"^reset/$", PasswordResetFormView.as_view(), name="password_reset"),
    url(r"^reset/complete/$", PasswordResetCompleteView.as_view(), name="password_reset_complete"),
    url(
        r"^reset/confirm/([0-9A-Za-z_\-]+)/([0-9A-Za-z]{1,13})/([0-9A-Za-z-=_]{1,32})/$",
        PasswordResetConfirmView.as_view(),
        name="password_reset_confirm",
    ),
    url(r"^reset/done/$", PasswordResetDoneView.as_view(), name="password_reset_done"),
)
Пример #3
0
from django.conf.urls import patterns, url

from password_policies.views import PasswordChangeFormView
from password_policies.views import PasswordChangeDoneView
from password_policies.views import PasswordResetCompleteView
from password_policies.views import PasswordResetConfirmView
from password_policies.views import PasswordResetFormView
from password_policies.views import PasswordResetDoneView


urlpatterns = patterns('',
                       url(r'^change/done/$',
                           PasswordChangeDoneView.as_view(),
                           name="password_change_done"),
                       url(r'^change/$',
                           PasswordChangeFormView.as_view(),
                           name="password_change"),
                       url(r'^reset/$',
                           PasswordResetFormView.as_view(),
                           name="password_reset"),
                       url(r'^reset/complete/$',
                           PasswordResetCompleteView.as_view(),
                           name="password_reset_complete"),
                       url(r'^reset/confirm/([0-9A-Za-z]{1,13})/([0-9A-Za-z]{1,13})/([0-9A-Za-z-=_]{1,32})/$',
                           PasswordResetConfirmView.as_view(),
                           name="password_reset_confirm"),
                       url(r'^reset/done/$',
                           PasswordResetDoneView.as_view(),
                           name="password_reset_done"),
                       )
Пример #4
0
)
from django.views.generic import RedirectView
from password_policies.views import PasswordChangeFormView, PasswordChangeDoneView

admin.autodiscover()

DEV_VERSION = "dev"
ACCEPTED_RESOURCE_PATTERN = "[-_.0-9A-Za-z ]"

urlpatterns = patterns(
    "",
    url(r"^accounts/password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", password_reset_confirm),
    url(r"^favicon\.ico$", RedirectView.as_view(url="/static/img/favicon.ico")),
    url(r"^accounts/ajax_change_password/$", "phantomweb.views.django_change_password"),
    url(r"^accounts/change_password/$", PasswordChangeFormView.as_view(), name="password_change"),
    url(r"^accounts/change_password/done/$", PasswordChangeDoneView.as_view(), name="password_change_done"),
    url(r"^accounts/reset_password/$", password_reset),
    url(r"^accounts/reset_password/done$", password_reset_done),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^accounts/password/rest_complete/$", password_reset_complete),
    url(r"^accounts/login/$", "django.contrib.auth.views.login"),
    url(r"^accounts/logout/$", "django.contrib.auth.views.logout", name="logout"),
    url(r"^accounts/signup/$", "phantomweb.views.django_sign_up"),
    url(r"^phantom/appliances/?$", "phantomweb.views.django_publiclc_html"),
    url(r"^phantom/imagegenerators$", "phantomweb.views.django_imagegenerators_html"),
    url(r"^phantom/profile/?$", "phantomweb.views.django_profile_html"),
    url(r"^phantom/?$", "phantomweb.views.django_phantom_html"),
    url(r"^$", "phantomweb.views.django_phantom_html"),
    url(r"^phantom/launchconfig/?$", "phantomweb.views.django_lc_html"),
    url(r"^phantom/domain/?$", "phantomweb.views.django_domain_html"),
    # API dev version