django-improved-user v1.0a1

33 views
Skip to first unread message

Andrew Pinkham

unread,
Oct 12, 2017, 12:21:31 PM10/12/17
to django...@googlegroups.com
Hi everyone!

Yesterday I released v1.0a1 of django-improved-user, which provides a custom Django user model with international identity handling and uses email as the username. 1.0a1 is feature complete and tested against Django 2.0a1 (as well as Django 1.8, 1.10, and 1.11).

I'm emailing the list to solicit feedback and review. The project is a collaboration between Russell Keith-Magee and myself based on our experience building custom User models (read more about that at http://django-improved-user.readthedocs.io/en/latest/rationale.html), and we'd like this to be helpful to the community.

I would therefore really appreciate any feedback!

Thanks you!
Andrew
http://jambonsw.com
http://django-unleashed.com

Andrew Pinkham

unread,
Oct 12, 2017, 12:37:10 PM10/12/17
to django...@googlegroups.com

Joe Landrigan

unread,
Oct 12, 2017, 1:58:42 PM10/12/17
to Django users
Out of curiosity, do you have any intention of coordinating with allauth or guardian?  I feel like all three of these are good individually, but if they were combined into a single entity they would be far greater than the sum of their parts.

Thanks,
Joe

Andrew Pinkham

unread,
Oct 13, 2017, 9:28:32 AM10/13/17
to django...@googlegroups.com
Hi Joe,

I'm not 100% clear on what you mean by coordinating. Apologies if I miss the mark.

You should be able to use improved-user with both allauth and guardian (but I admit I have not tried!).

Allauth provides some notes on using a custom model, and covers how to use a model that doesn't have a username:

http://django-allauth.readthedocs.io/en/latest/advanced.html#custom-user-models

In Guardian's case, I would recommend subclassing improved-user.mixins.AbstractUser and guardian.mixins.GuardianUserMixin to create a new custom User model in your own project, rather than allowing guarding to monkey-patch the model. More about that at the links below:

https://django-guardian.readthedocs.io/en/stable/userguide/custom-user-model.html
https://github.com/django-guardian/django-guardian/blob/d8df846654634b93c3871d81d16304d553582e1b/guardian/mixins.py#L211

If you're wondering about whether improved-user will integrate the codebase with either of these, then the answer is no. With that said, I can see how a cookiecutter template that integrates all three of these tools together could be a time-saver to others, but do not have plans to create such a template and cannot currently commit to another project.

Hope this helps,
Reply all
Reply to author
Forward
0 new messages