@receiver(post_save, sender=User)
def user_signup_handler(sender, **kwargs):
 if (('created' in kwargs) and kwargs['created']):
  site = configuration_helpers.get_value('SITE_NAME')
  if site:
   user_signup_source = UserSignupSource(user=kwargs['instance'], site=site)
   user_signup_source.save()
   log.info(u'user {} originated from a white labeled "Microsite"'.format(kwargs['instance'].id))

@ receiver ( post_save , sender = User ) def user_signup_handler ( sender , ** kwargs ) : if ( ( 'created' in kwargs ) and kwargs [ 'created' ] ) : site = configuration_helpers . get_value ( 'SITE_NAME' ) if site : user_signup_source = UserSignupSource ( user = kwargs [ 'instance' ] , site = site ) user_signup_source . save ( ) log . info ( u'user {} originated from a white labeled "Microsite"' . format ( kwargs [ 'instance' ] . id ) )
handler that saves the user signup source when the user is created .