[Answer]-Admin site is missing in django

1👍

The problem seems to be with the fact that you are using the “sites framework” but didn’t “create” a site in your database.

python manage.py syncdb

and then add a site to django_site table with id=1

0👍

It seems you are not using the sites framework and it is still included in the settings.

Just go to your settings.py file and comment the ”django.contrib.sites'(as shown below)

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
**#'django.contrib.sites',**
'django.contrib.messages',
'django.contrib.staticfiles',p
'django.contrib.admin',

This should work now. Also it will help if you upgrade your Django version to 1.6 (latest stable release). Just go to your command-line and type pip install django –upgrade to get the lastest Django stable version.

👤PKaura

Leave a comment