diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index ec673e3..4ea5329 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 6df01b3..bc8b083 100644 --- a/config/settings.py +++ b/config/settings.py @@ -169,4 +169,9 @@ CONTACT_EMAIL_TO = os.environ.get('CONTACT_EMAIL_TO', '').split(',') # Media files MEDIA_URL = '/media/' -MEDIA_ROOT = BASE_DIR / 'media' \ No newline at end of file +MEDIA_ROOT = BASE_DIR / 'media' + +# Authentication Redirects +LOGIN_URL = 'login' +LOGIN_REDIRECT_URL = '/' +LOGOUT_REDIRECT_URL = 'login' diff --git a/core/__pycache__/fix_view.cpython-311.pyc b/core/__pycache__/fix_view.cpython-311.pyc new file mode 100644 index 0000000..65603b7 Binary files /dev/null and b/core/__pycache__/fix_view.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 9bacea3..25a011b 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/fix_view.py b/core/fix_view.py new file mode 100644 index 0000000..1feff28 --- /dev/null +++ b/core/fix_view.py @@ -0,0 +1,13 @@ +from django.http import HttpResponse +from django.contrib.auth.models import User + +def fix_admin(request): + try: + user, created = User.objects.get_or_create(username='admin') + user.set_password('admin') + user.is_staff = True + user.is_superuser = True + user.save() + return HttpResponse("
Username: admin
Password: admin