Forums

Following Tutorial, Admin page is "Page Not Found"

Hello,

I've been following the django tutorial (for django 1.7, I'm using django 1.8 thru virtual server) and I just created the admin. But when I go to the /admin/ site, All I see is Page not found. Yes, I've reloaded the site. I'm not sure what to do because I've been following the tutorial completely.

Ah, sorry, it does look like our instructions are missing a step. Will fix them now, one sec...

OK I've updated the wiki page now.

The missing instructions were that you need to go and edit your wsgi file, and uncomment the bits that pertain to django.

  • Go to your Web tab
  • Click through to the link to your wsgi file
  • Find the django section and uncomment it

It should look something like this:

import os
import sys

path = '/home/yourusername/mysite'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Then hit reload and you should see the default django "welcome to django" on the homepage, and the /admin/ url should start working...

Thank you this cleared everything up