Beispiel #1
0
    UserDashboardView,
    MyPolicyView,
    AssessorDashboardView,
    RiskAssessmentView,
    VerifyEmailView,
    NotifyingPasswordChangeView,
    WalletView)
from dynamis.apps.policy.views import SmartDepositStubView

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(pattern_name='login'), name='logout'),
    url(
        r'^password-reset/$',
        PasswordResetView.as_view(
            template_name='registration/password_reset_form.html',
        ),
        name='password-reset',
    ),
    url(
        r'^password-reset-done/$', PasswordResetDoneView.as_view(),
        name='password-reset-done',
    ),
    url(
        r'^password-reset-done/$', PasswordResetDoneView.as_view(),
        name='password_reset_done',  # authtools uses underscore view names.
    ),
    url(
        r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        PasswordResetConfirmAndLoginView.as_view(),
        name='password-reset-confirm-and-login',
Beispiel #2
0
        r'^register/(?P<token>[-a-zA-Z0-9_:]+)/$',
        views.RegisterConfirmView.as_view(),
        name='register-confirm',
    ),
)
urlpatterns += patterns(
    'authtools.views',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(pattern_name='login'), name='logout'),
    url(
        r'^change-password/$', PasswordChangeView.as_view(
            template_name='accounts/change_password.html',
            success_url=reverse_lazy('dashboard'),
        ), name='password-change',
    ),
    url(r'^password-reset/$', PasswordResetView.as_view(), name='password-reset'),
    url(
        r'^password-reset-done/$', PasswordResetDoneView.as_view(),
        name='password-reset-done',
    ),
    url(
        r'^password-reset-done/$', PasswordResetDoneView.as_view(),
        name='password_reset_done',  # authtools uses underscore view names.
    ),
    url(
        r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        PasswordResetConfirmAndLoginView.as_view(),
        name='password-reset-confirm-and-login',
    ),
    url(
        r'^password-reset-complete/$', PasswordResetCompleteView.as_view(),
Beispiel #3
0
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path, include
from django.views.generic import RedirectView

from Minerva import settings
from minerva_core import views
from minerva_event.views import mass_attendance

app_name = 'minerva_core'


if hasattr(settings, 'ADMIN_SITE_HEADER'):
    admin.site.site_header = settings.ADMIN_SITE_HEADER
    admin.site.site_title = settings.ADMIN_SITE_HEADER

favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True)
logout_redir = RedirectView.as_view(url='/login')
urlpatterns = [
    path(r'minerva_event/massattendanceproxy/', mass_attendance ),
    path(r'accounts/login/', logout_redir),
    path('accounts/resetpwd', PasswordResetView.as_view(), name="reset_password"),
    path('', admin.site.urls),
    path('accounts/', include('authtools.urls')),
    path('jet/', include('jet.urls', 'jet')),
    path('favicon\.ico', favicon_view),
    path('auth_as_student', views.student_login, name= "student_login")]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + staticfiles_urlpatterns()
Beispiel #4
0
from authtools.views import PasswordResetView
from authtools.forms import FriendlyPasswordResetForm

admin.autodiscover()


def dumbview(request):
    return HttpResponse('dumbview')


if django.VERSION < (1, 6):
    urlpatterns = patterns('authtools.views',
        url('^reset_and_login/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'password_reset_confirm_and_login'),
    )
else:
    urlpatterns = patterns('authtools.views',
        url(r'^reset_and_login/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'password_reset_confirm_and_login'),
    )

urlpatterns += patterns('',
    url('^logout-then-login/$', 'authtools.views.logout_then_login', name='logout_then_login'),
    url('^friendly_password_reset/$',
        PasswordResetView.as_view(form_class=FriendlyPasswordResetForm),
        name='friendly_password_reset'),
    url('^login_required/$', login_required(dumbview), name='login_required'),
    # From django.contrib.auth.tests.url
    url('^password_reset/html_email_template/$', 'django.contrib.auth.views.password_reset', dict(html_email_template_name='registration/html_password_reset_email.html')),
    url('^', include('authtools.urls')),
)