def contact_autocreate_handler(sender, instance, created, **kwargs):
 if created:
  try:
   contact_type = ContactType.objects.filter((models.Q(name='Person') | models.Q(slug='person')))[0]
   contact = Contact(contact_type=contact_type, name=instance.name, related_user=instance)
   contact.save()
  except:
   pass

def contact_autocreate_handler ( sender , instance , created , ** kwargs ) : if created : try : contact_type = ContactType . objects . filter ( ( models . Q ( name = 'Person' ) | models . Q ( slug = 'person' ) ) ) [ 0 ] contact = Contact ( contact_type = contact_type , name = instance . name , related_user = instance ) contact . save ( ) except : pass
when a user is created .