Friday, October 13, 2017

Re: django-improved-user v1.0a1

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,
Andrew
http://jambonsw.com
http://django-unleashed.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/98F4117C-EB5E-48AB-AC3D-193694E4BC70%40andrewsforge.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment