From 6030bd59491c58a4a5020f6b9cb8b1ad7db31dde Mon Sep 17 00:00:00 2001 From: aeltheos Date: Thu, 7 Oct 2021 16:50:35 +0200 Subject: [PATCH] fixed template path and deleted settings.py as it was no longer need changed accounts/signup.html to accounts/registration.html --- accounts/settings.py | 8 -------- .../templates/{signup.html => accounts/registration.html} | 0 accounts/views.py | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 accounts/settings.py rename accounts/templates/{signup.html => accounts/registration.html} (100%) diff --git a/accounts/settings.py b/accounts/settings.py deleted file mode 100644 index 16e4aa7..0000000 --- a/accounts/settings.py +++ /dev/null @@ -1,8 +0,0 @@ -import os -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -TEMPLATES = [ - { - 'DIRS': [os.path.join(BASE_DIR, 'photo21/accounts/templates')], - 'APP_DIRS': True, - }, -] diff --git a/accounts/templates/signup.html b/accounts/templates/accounts/registration.html similarity index 100% rename from accounts/templates/signup.html rename to accounts/templates/accounts/registration.html diff --git a/accounts/views.py b/accounts/views.py index e628198..df26fd4 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -14,7 +14,7 @@ def signup(request): user.email = form.cleaned_data.get('email') login(request, user) return redirect('/') - return render(request, 'signup.html', {'form': form}) + return render(request, 'accounts/registration.html', {'form': form}) else: form = RegistrationForm() - return render(request, 'signup.html', {'form': form}) + return render(request, 'accounts/registration.html', {'form': form})