I am trying to upgrade a project from Django 1.6 to 1.7. I get the following error:
[Thu Oct 09 14:16:41 2014] [error] [client 95.79.172.156] mod_wsgi (pid=1
settings.AUTH_USER_MODEL is a string (that's why you get AttributeError: 'str' object has no attribute '_meta' - it expects a Model) and should be used only on ForeignKey declarations:
class Article(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL)
If you want to refer to your user model somewhere else you need to use get_user_model:
from django.contrib.auth import get_user_model UserModel = get_user_model()