macropin / django-registration

Django-registration (redux) provides user registration functionality for Django websites.
http://django-registration-redux.readthedocs.org
Other
974 stars 350 forks source link

using AbstractBaseUser #317

Closed fumeno closed 6 years ago

fumeno commented 6 years ago

Hello All,

Now I'm trying to use django-registration with customize user.( AbstractBaseUser) I changed USERNAME_FIELD. (username -> email)

Then I got a error on registration/models.py which said that user doesn't have username. I checked models.py. The following code use 'username', but I think it's better to use "get_username()'. Would you please consider this ?

------------Original-------------- ctx_dict = { 'user': self.user.username, 'site': site, } ------------Original-------------- ------------my opinion-------------- ctx_dict = { 'user': self.user.get_username(), 'site': site, } ------------my opinion--------------

joshblum commented 6 years ago

@fumeno sorry about the issue! I think https://github.com/macropin/django-registration/pull/318 addresses your problem, take a look and let me know!

fumeno commented 6 years ago

@joshblum yes. that I would like to.

joshblum commented 6 years ago

Great! Closed by #318