On 17/03/2012, at 10:46 PM, Donald Stufft wrote:

> On Saturday, March 17, 2012 at 1:59 AM, Russell Keith-Magee wrote:
>> 
>> * It solves the immediate problem ...
>> 
>> As I see it, the immediate problem is that developers want to be able to 
>> modify the base requirements of auth.User. There may well be people who want 
>> to completely change contrib.auth, but for the moment, the 90% case can be 
>> solved by modifying max_length or setting unique=True on the email field, 
>> and/or removing the username field. The rest of auth.User is fine, at least 
>> for now.
> It doesn't really solve the immediate problem though. It does technically but 
> it also requires every single app that uses auth.User to update itself
> before you can use it which makes it less useful.

To my mind, this isn't any different to the situation with any other major 
feature added in a Django release:

 a) Existing apps continued to work as is. 

 b) Under certain conditions, existing apps will be able to use the new 
features transparently

 c) To be completely compatible, some modifications to the existing app are 
required

Yes, this means that some apps will need to be labelled as "has been updated 
for the 1.5 User model" -- but that's not without precedent.

The only way I can see around this problem is to come up with a way for 
ForeignKey(User) to transparently become an effective 
LazyForeignKey('auth.User'). If we could manage this, then any existing 
ForeignKey(User) would adapt to the new class, so the set of apps in class (c) 
would be reduced to those that use features of User that aren't part of the new 
User contract.

Personally, I like the idea of having an explicit "Lazy" reference; but we 
might be able to address this in other ways. For example, if we mark a model 
class as "swappable", references to that class would be resolved to the class 
named in the app configuration. This might also provide the hook to prevent the 
auth_user table from being created by syncdb (so we don't get empty auth_user 
tables being created)

Yours,
Russ Magee %-)

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

Reply via email to