From 0c56404ea1eebbf36086f38caaf74c79d4ec5213 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Aguirre?= Date: Thu, 14 Apr 2011 10:26:54 -0300 Subject: [PATCH] Updated doc with user-new signal details --- README.rst | 10 ++++++++++ doc/signals.rst | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.rst b/README.rst index 45dc366..25c8cb8 100644 --- a/README.rst +++ b/README.rst @@ -277,6 +277,16 @@ Take into account that when defining a custom User model and declaring signal handler in models.py, the imports and handler definition *must* be made after the custom User model is defined or circular imports issues will be raised. +Also a new-user signal is sent when new accounts are created:: + + from social_auth.signals import socialauth_registered + + def new_users_handler(sender, user, response, details, **kwargs): + user.is_new = True + return False + + socialauth_registered.connect(new_users_handler, sender=None) + ------ OpenId diff --git a/doc/signals.rst b/doc/signals.rst index bfdb2e2..9a9fd20 100644 --- a/doc/signals.rst +++ b/doc/signals.rst @@ -23,5 +23,15 @@ Take into account that when defining a custom User model and declaring signal handler in models.py, the imports and handler definition *must* be made after the custom User model is defined or circular imports issues will be raised. +Also a new-user signal is sent when new accounts are created:: + + from social_auth.signals import socialauth_registered + + def new_users_handler(sender, user, response, details, **kwargs): + user.is_new = True + return False + + socialauth_registered.connect(new_users_handler, sender=None) + .. _User Profiles: http://www.djangobook.com/en/1.0/chapter12/#cn222 -- 2.39.5