forked from enviPath/enviPy
[Feature] Password Reset Flow (#88)
Fixes #83 Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#88
This commit is contained in:
26
epdb/urls.py
26
epdb/urls.py
@ -1,21 +1,36 @@
|
||||
from django.urls import path, re_path
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from . import views as v
|
||||
# from sesame.views import LoginView
|
||||
|
||||
UUID = '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}'
|
||||
|
||||
urlpatterns = [
|
||||
# Sesame
|
||||
# path("login/", v.EmailLoginView.as_view(), name="email_login"),
|
||||
# path("login/auth/", LoginView.as_view(), name="login"),
|
||||
|
||||
# Home
|
||||
re_path(r'^$', v.index, name='index'),
|
||||
|
||||
# Login
|
||||
re_path(r'^login', v.login, name='login'),
|
||||
re_path(r'^logout', v.logout, name='logout'),
|
||||
|
||||
# Built In views
|
||||
path('password_reset/', auth_views.PasswordResetView.as_view(
|
||||
template_name='static/password_reset_form.html'
|
||||
), name='password_reset'),
|
||||
|
||||
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(
|
||||
template_name='static/password_reset_done.html'
|
||||
), name='password_reset_done'),
|
||||
|
||||
path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(
|
||||
template_name='static/password_reset_confirm.html'
|
||||
), name='password_reset_confirm'),
|
||||
|
||||
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(
|
||||
template_name='static/password_reset_complete.html'
|
||||
), name='password_reset_complete'),
|
||||
|
||||
|
||||
# Top level urls
|
||||
re_path(r'^package$', v.packages, name='packages'),
|
||||
re_path(r'^compound$', v.compounds, name='compounds'),
|
||||
@ -78,5 +93,6 @@ urlpatterns = [
|
||||
|
||||
re_path(r'^depict$', v.depict, name='depict'),
|
||||
|
||||
# OAuth Stuff
|
||||
path("o/userinfo/", v.userinfo, name="oauth_userinfo"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user