Re: Lazy registration with django.contrib.auth

2007-02-02 Thread Gary Wilson

On Feb 2, 5:29 pm, "Daniel" <[EMAIL PROTECTED]> wrote:
> I would like to implement this as an extension of the existing auth
> code.  Is there any interest in a trunk patch to achieve this?  If so,
> any suggestions on best practices?

I would suggest taking a look at ticket #3011 (and its attached
patch), which deals with allowing extension of the contrib.auth User
model.

http://code.djangoproject.com/ticket/3011


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Lazy registration with django.contrib.auth

2007-02-02 Thread Daniel

Greetings,

I'm developing an application where http://ajaxpatterns.org/
Lazy_Registration">Lazy Registration is on my feature list, and I
believe this can be accomplished pretty cleanly using the django auth
system.

I would like to implement this as an extension of the existing auth
code.  Is there any interest in a trunk patch to achieve this?  If so,
any suggestions on best practices?

I still looking into the auth code, but it looks like the way to
handle this would be to create a sort of "hybrid" user class, half way
between AnonymousUser and a registered User, called (for instance)
SessionUser or LazyUser.  Via the AuthenticationMiddleware class, a
global flag would trigger the initialization of the user instance to a
LazyUser instead of AnonymousUser (or alternately, a replacement of
the AuthenticationMiddleware would be created for this purpose).  The
details of how to model the LazyUser would need to be hashed out, but
I can see a couple options which build off the existing system.

Before I look into this further - someone clue me in on whether or not
I should bother working in contrib.auth, or should I be looking for a
higher level (user-land) solution?  Or is there anyone out there who's
already solved this problem with Django?

Thanks,
Dan


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---