I’m going through the standard Django tutorial to create an admin for an app. After commenting the admin related stuff in settings and running syncdb I’m getting this message:
DoesNotExist at /admin/ Site matching query does not exist.
Can anyone help me figure this out?
The
Siteobject for your Django project is missing. Each Django project has aSiteobject which contains the site’s name and domain. It is usually automatically created when creating a Django project (in particular, when thesyncdbcommand runs) but in your case it seems that didn’t happen.To fix it:
Open the Django shell for your site (
python manage.py shell).Type the following:
If you want to change these values later, go to your admin panel (
/admin/) and edit the site object in the sectionSites.