python - Error Migrating Comment Framework Into Django -


i trying use django's built-in comment framework project working on. according django documentation first 2 steps are:

  1. install comments framework adding 'django.contrib.comments' installed_apps
  2. run python manage.py migrate django create comments tables.

so did , got following error

comments.comment.site: (fields.e300) field defines relation model 'site', either not installed, or abstract.

i don't know went wrong because did add 1 line installed_apps , ran migrate. appreciated.

try adding django.contrib.sites in installed_apps , set site_id=1 in settings.py.

it's shown error:

field defines relation model 'site', either not installed, or abstract.

and migration file source code:

dependencies = [ ('sites', '0001_initial'), migrations.swappable_dependency(settings.auth_user_model), ('contenttypes', '0001_initial'), ] 

it suggested django.contrib.sites indeed dependency app.

edited:

in fact, included docs quick start guide:

enable "sites" framework adding 'django.contrib.sites' installed_apps , defining site_id.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -