Search code examples
djangoadminwagtailsuperuser

Wagtail superuser unable to log in to CMS


I'm new to Wagtail and django. I've completed the https://learnwagtail.com/wagtail-for-beginners/ course and managed to get my site up and running on Digital ocean, however I'm unable to login to the admin area. I have tried using the superuser credentials that were used locally. I have also tried multiple times to create a new superuser with:

python manage.py createsuperuser

and while the process appears to work successfully in the terminal (I'm logged in via SSH to my DO droplet), I continually receive the 'Your username and password didn't match. Please try again.' message when attempting to log in with the newly created username and password. If I use the shell to check users I can see my newly created user exists. I have also tried using

python manage.py changepassword myusername

to change the password on the previously created superusers, but again, while the process appears to work successfully in the terminal I continue to receive the error message when attempting to log in. Can anyone point me in the right direction as to what I might be missing or doing wrong here? And / or how I might best debug the issue? Thanks in advance!


Solution

  • I needed to make sure my manage.py commands were picking up my production settings. So running: DJANGO_SETTINGS_MODULE=mysite.settings.production ./manage.py createsuperuser

    and NOT: python manage.py createsuperuser was the solution.