honzakral / django-threadedcomments

django-threadedcomments is a simple yet flexible threaded commenting system for Django.
BSD 3-Clause "New" or "Revised" License
622 stars 165 forks source link

Error following README installation for Django 2.1.2: 'Settings' object has no attribute 'SITE_ID' #103

Closed ghost closed 5 years ago

ghost commented 5 years ago

I am getting an error

'Settings' object has no attribute 'SITE_ID'

How can I correct this? I am following the instructions on the README for setting up the threaded comments app, but when I provide a template that displays the comments for my article, I get that error on a GET request.

elcone commented 5 years ago

You need to enable the sites framework.

  1. Add 'django.contrib.sites' to your INSTALLED_APPS in settings.py.
  2. Also in settings.py set SITE_ID = 1
  3. Run python manage migrate
ghost commented 5 years ago

Thanks I had 'django.contribe.sites' in my INSTALLED_APPS, the missing piece was setting SITE_ID = 1