You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just created a basic project with cookiecutter-django. After having a working site I tried to install zinnia following documentation but It doens't migrate the database. I receive the following error:
LookupError: Model 'users.User' not registered.
Expected behavior
The migration could be done without any error.
Steps to reproduce the issue
Install cookiecutter-django basic project (Mailgun, Heroku and etc). After having a working site
Install zinnia following documentation
try migrate
python manage.py migrate
Specifications
Zinnia version: 0.20
Django version: 2.0.4
Python version: 3.5.2
Operating system: Linux Mint 18.2
Disclaimer
Before submitting an issue make sure you have:
Read the guidelines for contributing.
Checked for duplicate issues.
Not a support request.
The text was updated successfully, but these errors were encountered:
def safe_get_user_model():
"""
Safe loading of the User model, customized or not.
"""
user_app, user_model = settings.AUTH_USER_MODEL.split('.')
return apps.get_registered_model(user_app, user_model)
I changed it as:
[...]
from django.contrib.auth import get_user_model
[...]
def safe_get_user_model():
"""
Safe loading of the User model, customized or not.
"""
# user_app, user_model = settings.AUTH_USER_MODEL.split('.')
# return apps.get_registered_model(user_app, user_model)
return get_user_model()
and runs perfectly.
I'm trying to test it in a clean installation. If it works, i'll make a pull request with it.
Admoroux
added a commit
to Admoroux/django-blog-zinnia
that referenced
this issue
Mar 14, 2019
This change fixes issue Can't migrate database on fresh install with cookiecutter-django. Fantomas42#537, opened by flaviobarros. This way, User model is allways notified right using Django Auth system.
Actual behavior
I have just created a basic project with cookiecutter-django. After having a working site I tried to install zinnia following documentation but It doens't migrate the database. I receive the following error:
LookupError: Model 'users.User' not registered.
Expected behavior
The migration could be done without any error.
Steps to reproduce the issue
python manage.py migrate
Specifications
Disclaimer
Before submitting an issue make sure you have:
The text was updated successfully, but these errors were encountered: