Hi All, I’m working through Tutorial 2 and have gotten as far as logging into the admin page as the newly created superuser. However, I get the 403 error below when I enter the login details:
The steps I have taken are:
- All tutorial instructions (1 & 2) followed to this point
- Project creates, server started, django pages rendered, migrations applied
- Superuser created, Superuser credentials entered to admin login page on development server
- 403 error received when credentials entered to server
Steps taken to resolve the issue are:
- Checked CSRF token is present in dev tools - it is contained in a hidden field in the login form
- Attempted hard refresh of web page (Ctrl + Shift + R) and cleared cookies
- Tried to disable CSRF line in MIDDLEWARE section of settings.py
- From CSRF_TRUSTED_ORIGINS overview I have tried to add CSRF_TRUSTED_ORIGINS = [https://8000-dkelly255-djangotutorial-quxbwl9i55a.ws-eu31.gitpod.io/] as a variable in settings.py - however this doesn’t allow the Django admin page to load at all
I’ve read through the CSRF_TRUSTED_ORIGINS overview but am not actually sure how to proceed and resolve the error so I can keep going with the rest of the tutorial
Thanks in advance for any clarification or guidance you can provide