django-wiki / django-nyt

Notification system for Django with batteries included: Email digests, user settings, JSON API
Apache License 2.0
144 stars 47 forks source link

A custom User model does not always have a username field. #16

Closed tonioo closed 9 years ago

tonioo commented 9 years ago

See https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD

benjaoming commented 9 years ago

Thanks for looking into this!

Would you be able to make the change so it's backwards compatible? Maybe in django_nyt.settings put:

USERNAME_FIELD = getattr(settings, 'USERNAME_FIELD', 'username')

..and then use django_nyt.settings as a compatibility layer.

tonioo commented 9 years ago

Backward compatible with what? Django < 1.5 ?

benjaoming commented 9 years ago

Oh right, Django 1.4 is completely unsupported now, not even documentation is available anymore... nevermind that part then!

tonioo commented 9 years ago

Ok. Is there still something that prevents this PR to be merged ?

benjaoming commented 9 years ago

See commit comment...

https://github.com/benjaoming/django-nyt/pull/16/files#r35203092

benjaoming commented 9 years ago

Thanks for fixing this, sorry about slowness!