On Thu, Mar 22, 2012 at 3:33 AM, Alex Ogier <[email protected]> wrote:

> I made a topic branch and refactored everything I thought was nicely
> reusable from auth.User into abstract models in
> django/contrib/auth/mixins.py. There are some good reusable pieces inside
> auth.User, even if you want to entirely scrap Django's notion of identity
> and the username and/or email fields. The change is transparent to Django's
> test suite, and I did my best to leave the existing API identical.
>
> My hope is that we can make, for example, contrib.admin only dependent on
> a class implementing PermissionsMixin. Whether we do late binding to
> auth.User with some jiggery-poker as described in the recent auth.User
> reboot thread, load time plugging into the auth.User inheritance list as I
> proposed in the first email in this thread, or just punt on the whole thing
> and ask people to implement their own concrete classes, I think the
> refactoring is a nice backwards-compatible way to expose pieces of
> auth.User for people to reuse and/or depend on.
>
> https://github.com/ogier/django/tree/auth-mixins
>
> Does anyone have any opinions?
>
> -Alex Ogier
>
>
> It looks OK, but there is one really big issue with your approach -
database blowup.
You can easily choose mixins to compose your User model, but once it's done
your database layout is fixed.
If you then decide to use different mixins - it would be impossible without
very smart db schema migration tool.


Mateusz Marzantowicz

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to