Tuesday, May 17, 2011

default group for new users

Is there a good way to add new users to a default group when they are
created (e.g. via django-registration)? I just tried binding the
post_save signal for User, and adding the group in the signal handler
(if "created" is true). However, I haven't found a good place (file)
to put the connect() call, so the signal will be caught: i.e. some
file that will consistently be loaded before a User is created.

I'm currently thinking I will override the django-registration
activate url, and add the code there, before calling
registration.views.activate. Obviously this isn't the most general
solution.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate