From c45de45605fb9939b5796426e9317bd7d248955a Mon Sep 17 00:00:00 2001 From: klonfish Date: Sun, 5 May 2019 00:18:50 +0200 Subject: [PATCH] Drop profile redirect and use login url settings --- README.md | 15 +++++++++------ bam/urls.py | 5 ----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c944e34..0639a07 100644 --- a/README.md +++ b/README.md @@ -29,26 +29,29 @@ ln -sr bam PROJECT_NAME/bam 5. Set `bam.hashers.LDAPPBKDF2PasswordHasher` as the first item of the `PASSWORD_HASHERS` array in the project's `settings.py`. - 6. Insert the configuration values described below according to your setup + 6. Set `LOGIN_URL` to `/login/` and `LOGIN_REDIRECT_URL` to `/` in the + project's `settings.py`. + + 7. Insert the configuration values described below according to your setup into the project's `settings.py`. - 7. Append `path('', include('bam.urls')),` to the project's `urls.py`. + 8. Append `path('', include('bam.urls')),` to the project's `urls.py`. - 8. Initialize database: + 9. Initialize database: ``` ./manage.py migrate ``` - 9. Create a superuser account: + 10. Create a superuser account: ``` ./manage.py createsuperuser ``` - 10. Download _Pure.css_ to `bam/static/pure-min.css`. + 11. Download _Pure.css_ to `bam/static/pure-min.css`. - 11. Start the development server: + 12. Start the development server: ``` ./manage.py runserver diff --git a/bam/urls.py b/bam/urls.py index 16f36e1..cc264ef 100644 --- a/bam/urls.py +++ b/bam/urls.py @@ -7,7 +7,6 @@ from bam.forms import HashedEmailPasswordResetForm import django.contrib.auth.views as auth_views urlpatterns = [ - path('accounts/profile/', RedirectView.as_view(pattern_name='profile')), path('', RedirectView.as_view(pattern_name='profile')), path('profile/', ProfileView.as_view(), name='profile'), @@ -53,8 +52,4 @@ urlpatterns = [ template_name='bam/password_reset_complete.html' ), name='password_reset_complete'), - - #path('password_reset_hashed/', - # PasswordResetHashedView.as_view(), - # name='password_reset_hashed'), ]