I recently installed Blogango, where I had the following error:
CommandError: One or more models did not validate:
blogango.blogentry: 'created_by' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
So I added settings.AUTH_USER_MODEL and now I get the following message:
ValueError: Cannot create form field for 'created_by' yet, because its related model 'users.User' has not been loaded yet
I went through my settings.py where it calls AUTH_USER_MODEL = 'users.User'
, and moved it higher up on the settings.py to try and get it load sooner.
As requested:
created_by = models.ForeignKey(settings.AUTH_USER_MODEL, unique=False)
What can I do to fix this?
It seems Blogango (is it https://github.com/agiliq/django-blogango?) does not support the custom user models introduced in Django 1.5.
The patch in Blogango should be pretty simple, just replace:
from django.contrib.auth.models import User
with:
from django.contrib.auth import get_user_model
User = get_user_model()
in django-blogango/blogango/models.py
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With