Beispiel #1
0
# Import django-urls.
from django.urls import path
# Import views.
from . import views
from django.contrib.auth.views import LogoutView
from two_factor.views import DisableView, LoginView, QRGeneratorView, SetupCompleteView, SetupView

# Set app name
app_name = 'account'
# Set url-patterns
urlpatterns = [
    path('', views.UserDetailView.as_view(), name='detail'),
    path('edit/', views.UserEditView.as_view(), name='edit'),
    path('changepassword/', views.change_password, name='change_password'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('login/', LoginView.as_view(), name='login'),
    path('two_factor/setup/', views.SetupView.as_view(), name='two_factor_setup'),
    path('two_factor/qr_code/', QRGeneratorView.as_view(), name='two_factor_qr'),
    path('two_factor/setup/complete/', SetupCompleteView.as_view(), name='two_factor_setup_complete'),
    path('two_factor/backup/tokens/', views.BackupTokensView.as_view(), name='two_factor_backup_tokens'),
    path('two_factor/disable/', DisableView.as_view(), name='two_factor_disable'),
]
Beispiel #2
0
 def get(self, request, *args, **kwargs):
     return DisableView.get(self, request, *args, **kwargs)
        'account/two_factor/backup/phone/register/',
        PhoneSetupView.as_view(),
        name='phone_create',
    ),
    path(
        'account/two_factor/backup/phone/unregister/<int:pk>/',
        PhoneDeleteView.as_view(),
        name='phone_delete',
    ),
    path(
        'account/two_factor/manage_keys/',
        ManageKeysView.as_view(),
        name='manage_keys',
    ),
]

profile = [
    path(
        'account/two_factor/',
        ProfileView.as_view(),
        name='profile',
    ),
    path(
        'account/two_factor/disable/',
        DisableView.as_view(),
        name='disable',
    ),
]

urlpatterns = (core + profile, 'two_factor')
        view=PhoneDeleteView.as_view(),
        name='phone_delete',
    ),
)

twilio = patterns(
    '',
    url(
        regex=r'^twilio/inbound/two_factor/(?P<token>\d+)/$',
        view=TwilioCallApp.as_view(),
        name='twilio_call_app',
    ),

)

profile = patterns(
    '',
    url(
        regex=r'^account/two_factor/$',
        view=ProfileView.as_view(),
        name='profile',
    ),
    url(
        regex=r'^account/two_factor/disable/$',
        view=DisableView.as_view(),
        name='disable',
    ),
)

urlpatterns = core + twilio + profile
Beispiel #5
0
js_info_dict = {
    'packages': ('conf.locale',),
}

two_factor_patterns = [
    url(r'^account/login/$', custom_2FA_login, name='login'),
    url(r'', include('two_factor.urls', 'two_factor')),
    url(r'^account/two_factor/setup/$', SetupView.as_view(), name='setup'),
    url(r'^account/two_factor/qrcode/$', QRGeneratorView.as_view(), name='qr'),
    url(r'^account/two_factor/setup/complete/$', SetupCompleteView.as_view(),
        name='setup_complete'),
    url(r'^account/two_factor/backup/tokens/$', teacher_verified(BackupTokensView.as_view()),
        name='backup_tokens'),
    url(r'^account/two_factor/$', teacher_verified(ProfileView.as_view()), name='profile'),
    url(r'^account/two_factor/disable/$', teacher_verified(DisableView.as_view()), name='disable'),
]


urlpatterns = patterns(
    '',
    url(r'^favicon\.ico$', RedirectView.as_view(url='/static/portal/img/favicon.ico', permanent=True)),

    url(r'^$', home_view, name='home'),
    url(r'^teach/$', teach, name='teach'),
    url(r'^play/$', play, name='play'),
    url(r'^about/$', TemplateView.as_view(template_name='portal/about.html'), name='about'),
    url(r'^help/$', TemplateView.as_view(template_name='portal/help-and-support.html'),
        name='help'),
    url(r'^contact/$', contact, name='contact'),
    url(r'^terms/$', TemplateView.as_view(template_name='portal/terms.html'), name='terms'),
Beispiel #6
0
 def get(self, request, *args, **kwargs):
     return DisableView.get(self, request, *args, **kwargs)
Beispiel #7
0
                                 success_url='backup_tokens'),
        name='backup_tokens',
    ),
    path(
        'two_factor/backup/phone/register/',
        PhoneSetupView.as_view(template_name='mfa/phone_register.html'),
        name='phone_create',
    ),
    path(
        'account/two_factor/backup/phone/unregister/<int:pk>/',
        PhoneDeleteView.as_view(),
        name='phone_delete',
    ),
    path(
        'account/two_factor/disable/',
        view=DisableView.as_view(template_name='mfa/disable.html'),
        name='disable',
    ),

    ## USER REGISTRATION ##
    path('register/',
         RegistrationView.as_view(
             form_class=RegistrationFormUniqueEmail,
             template_name='registration/form.html',
         ),
         name='registration_register'),
    path('register/complete',
         TemplateView.as_view(template_name='registration/complete.html'),
         name='registration_complete'),
    path('activate/complete',
         TemplateView.as_view(template_name='registration/activated.html'),
Beispiel #8
0
two_factor_patterns = [
    url(r'^account/login/$', custom_2FA_login, name='login'),
    url(r'', include('two_factor.urls', 'two_factor')),
    url(r'^account/two_factor/setup/$', SetupView.as_view(), name='setup'),
    url(r'^account/two_factor/qrcode/$', QRGeneratorView.as_view(), name='qr'),
    url(r'^account/two_factor/setup/complete/$',
        SetupCompleteView.as_view(),
        name='setup_complete'),
    url(r'^account/two_factor/backup/tokens/$',
        teacher_verified(BackupTokensView.as_view()),
        name='backup_tokens'),
    url(r'^account/two_factor/$',
        teacher_verified(ProfileView.as_view()),
        name='profile'),
    url(r'^account/two_factor/disable/$',
        teacher_verified(DisableView.as_view()),
        name='disable'),
]

urlpatterns = patterns(
    '',
    url(
        r'^favicon\.ico$',
        RedirectView.as_view(url='/static/portal/img/favicon.ico',
                             permanent=True)),
    url(r'^$', home_view, name='home'),
    url(r'^teach/$', teach, name='teach'),
    url(r'^play/$', play, name='play'),
    url(r'^about/$',
        TemplateView.as_view(template_name='portal/about.html'),
        name='about'),
        SetupCompleteView.as_view(),
        name="setup_complete",
    ),
    url(
        r"^account/two_factor/backup/tokens/$",
        teacher_verified(BackupTokensView.as_view()),
        name="backup_tokens",
    ),
    url(
        r"^account/two_factor/$",
        teacher_verified(ProfileView.as_view()),
        name="profile",
    ),
    url(
        r"^account/two_factor/disable/$",
        teacher_verified(DisableView.as_view()),
        name="disable",
    ),
]


urlpatterns = [
    # The first AIMMO URL renders the new AIMMO home page. It uses the same regex so as to overwrite the default
    # home page in the AIMMO project.
    # The second AIMMO URL imports all the URLs from the AIMMO project.
    url(r"^aimmo/$", aimmo_home, name="aimmo"),
    url(HOMEPAGE_REGEX, include("aimmo.urls")),
    url(
        r"^favicon\.ico$",
        RedirectView.as_view(url="/static/portal/img/favicon.ico", permanent=True),
    ),
Beispiel #10
0
    teacher_reject_student_request,
    teacher_class_password_reset,
)
from portal.views.teacher.home import teacher_home

js_info_dict = {"packages": ("conf.locale",)}

two_factor_patterns = [
    url(r"^account/login/$", custom_2FA_login, name="login"),
    url(r"", include("two_factor.urls", "two_factor")),
    url(r"^account/two_factor/setup/$", SetupView.as_view(), name="setup"),
    url(r"^account/two_factor/qrcode/$", QRGeneratorView.as_view(), name="qr"),
    url(r"^account/two_factor/setup/complete/$", SetupCompleteView.as_view(), name="setup_complete"),
    url(r"^account/two_factor/backup/tokens/$", teacher_verified(BackupTokensView.as_view()), name="backup_tokens"),
    url(r"^account/two_factor/$", teacher_verified(ProfileView.as_view()), name="profile"),
    url(r"^account/two_factor/disable/$", teacher_verified(DisableView.as_view()), name="disable"),
]


urlpatterns = patterns(
    "",
    url(r"^favicon\.ico$", RedirectView.as_view(url="/static/portal/img/favicon.ico", permanent=True)),
    url(r"^$", home_view, name="home"),
    url(r"^teach/$", teach, name="teach"),
    url(r"^play/$", play, name="play"),
    url(r"^about/$", TemplateView.as_view(template_name="portal/about.html"), name="about"),
    url(r"^help/$", TemplateView.as_view(template_name="portal/help-and-support.html"), name="help"),
    url(r"^contact/$", contact, name="contact"),
    url(r"^terms/$", TemplateView.as_view(template_name="portal/terms.html"), name="terms"),
    url(r"^administration/login/$", admin_login, name="administration_login"),
    url(r"^admin/$", RedirectView.as_view(url=reverse_lazy("aggregated_data"), permanent=True)),
Beispiel #11
0
    url(r'^register/complete/$', views.register_complete, name='register_complete'),
    url(r'^register/activate/(?P<activation_token>[-:\w]+)/$', views.register_activate, name='register_activate'),
    url(r'^password_reset/$', auth_views.password_reset, { 'template_name': 'password_reset.html' }, name='password_reset'),
    url(r'^password_reset/done/$', auth_views.password_reset_done, { 'template_name': 'password_reset_done.html' }, name='password_reset_done'),
    url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_confirm, { 'template_name': 'password_reset_confirm.html' }, name='password_reset_confirm'),
    url(r'^reset/done/$', auth_views.password_reset_complete, { 'template_name': 'password_reset_complete.html' }, name='password_reset_complete'),
    url(r'^login/$', PleioLoginView.as_view(), name='login'),
    url(r'^logout/$', views.logout, name='logout'),
    url(r'^profile/$', views.profile, name='profile'),
    url(r'^accept_previous_logins/(?P<acceptation_token>[-:\w]+)/$', views.accept_previous_login, name='accept_previous_login'),
    url(r'^account/login/$', PleioLoginView.as_view(), name='login'),
    url(r'^account/two_factor/setup/$', views.tf_setup, name='tf_setup'),
    url(r'^account/two_factor/setup/complete/$', view=SetupCompleteView.as_view(template_name = 'setup_complete.html'), name='setup_complete' ),
    url(r'^account/two_factor/$', view=ProfileView.as_view(template_name='tf_profile.html'), name='tf_profile' ),
    url(r'^account/two_factor/backup/tokens/$', view=BackupTokensView.as_view(template_name='backup_tokens.html'), name = 'backup_tokens'),
    url(r'^account/two_factor/disable/$', view=DisableView.as_view(template_name='tf_disable.html'), name='disable'),
    url(r'^account/sessions/$', view=SessionListView.as_view(template_name='session_list.html'), name='session_list'),
    url(r'^oauth/v2/authorize$', oauth2_views.AuthorizationView.as_view(), name='authorize'),
    url(r'^oauth/v2/token$', oauth2_views.TokenView.as_view(), name='token'),
    url(r'^oauth/v2/revoke_token$', oauth2_views.RevokeTokenView.as_view(), name='revoke-token'),
    url(r'^api/users/me$', api_views.me, name='me'),
    url(r'^admin/', admin.site.urls),
    url(r'^$', views.home, name='home')
]

tf_urls = [
    url(r'', include('two_factor.urls', 'two_factor'))
]
us_urls = [
    url(r'', include('user_sessions.urls', 'user_sessions'))
]