def create_profile_when_user_created(instance, created, raw, *args, **kwargs):
 if (created and (not raw)):
  (person, p_created) = Person.objects.get_or_create(user=instance)

def create_profile_when_user_created ( instance , created , raw , * args , ** kwargs ) : if ( created and ( not raw ) ) : ( person , p_created ) = Person . objects . get_or_create ( user = instance )
post-save hook for users .