Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such table as django_site

I am following from the docs of django-disqus to use it in my project. I have installed it in my settings, with other needed settings (API key and short name). But when I try to run these commands:

>>> from django.contrib.sites.models import Site
>>> Site.objects.all()

I am getting an error:

OperationalError: no such table: django_site

I have already installed django.contrib.admin in my settings and is using it in my project. So what am I missing?

like image 312
Robin Avatar asked Jun 16 '15 18:06

Robin


1 Answers

Make sure you have added 'django.contrib.sites' to your INSTALLED_APPS, then run migrate to create the required table.

python manage.py migrate
like image 147
Alasdair Avatar answered Oct 22 '22 19:10

Alasdair