I created a project from scratch with cookiecutter-django , using version 1.9.9, since in documentation of the django-blog-zinnia package it is recommended to use django < 2.0.
To use version 1.9.9 I simply downloaded cookiecutter-django on my computer, I got into the folder and changed the version:
git checkout 1.9.9
I followed the installation script and the project worked normally. HOWEVER, by adding zinnia according to the documentation, changing the file config/settings/common.py
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.sites',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'django_comments',
'mptt',
'tagging',
'zinnia',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'zinnia.context_processors.version', # Optional
]
}
}
]
and the file config/urls.py
from django.conf.urls import include
from django.conf.urls import url
url(r'^weblog/', include('zinnia.urls')),
url(r'^comments/', include('django_comments.urls')),
When attempting to migrate the database with
python manage.py migrate
I'm getting the following error:
LookupError: Model 'users.User' not registered.
How to fix and install zinnia in the project?