Closed ToxicWar closed 11 years ago
Changes in here look good to me! I'll defer to @lmorchard for doing a final r? and merging. Thanks!
I've been using this branch with a django 1.5 project with a custom user model. Problems encountered:
User = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
in models.py is correct for defining models, but breaks when the accessing user objects (this occurs once in models.py) as in this case User is a string not a class.try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
from django.contrib.auth.models import User
username
field, which is used all over the place. One way around this is to use User.objects.get_by_natural_key(username_or_similar)
but this doesn't gel with get_object_or_404
. See https://groups.google.com/forum/#!topic/django-users/8SLAr6JGXu4