Forums

No Access to Django Admin though It Worked On Local Machine

I did Django Girls blog tutorial, and it worked perfectly on my local machine, including signing into Admin and adding blog posts.

I uploaded to pythonanywhere, set up properly with mysql, did migrations which worked, the html all works for multiple apps, even Admin login html, BUT I cannot login even though I registered a superuser on pythonanywhere.

I need some help with this, folks. I've exhausted all options.

Here is my site with apps: miller2082.pythonanywhere.com/admin and other apps: miller2082.pythonanywhere.com/pronunciation_training

quick thing to check- did you register a super user after you had setup mysql, or before? maybe just create a superuser again?

This blog post on how to set the superuser password from the command line (use a Bash console on PythonAnywhere) may be helpful.

@bfj and @giles, Thank you guys for your assist.

I got it sorted out.

The mistake, or more appropriately oveersight was in ALLOWED_HOSTS, I failed to add my user name before '.pythonanywhere.com'.

So after I put the username there, and refreshed the app, it worked, although there was a delay.

So if anyone else experiences the same situation, after you find the fix, fix it, refresh the app, then have a cup of coffee and give it time to 'set'.

it works now, so thank you guys for the prompt replies

Problem solved.

Post closed.