debtinfo/models.py
def add_debtor(sender, **kwargs):
    """Create a Debtor instance for a created Profile instance."""
    profile = kwargs['instance']

    if kwargs['created']:
        try:
            debtor = Debtor.objects.get(debtor=profile.debtor)
        except Debtor.DoesNotExist:
            debtor = Debtor.objects.create(
                debtor=profile.debtor, id_number=profile.id_number, cell=profile.cell)
        else:
            pass
Create a Debtor instance for a created Profile instance.
Create a Debtor instance for a created Profile instance.
Create a Debtor instance for a created Profile instance .
def add_debtor(sender, **kwargs):
    profile = kwargs['instance']
    if kwargs['created']:
        try:
            debtor = Debtor.objects.get(debtor=profile.debtor)
        except Debtor.DoesNotExist:
            debtor = Debtor.objects.create(
                debtor=profile.debtor, id_number=profile.id_number, cell=profile.cell)
        else:
            pass
def add_debtor ( sender , ** kwargs ) : profile = kwargs [ 'instance' ] if kwargs [ 'created' ] : try : debtor = Debtor . objects . get ( debtor = profile . debtor ) except Debtor . DoesNotExist : debtor = Debtor . objects . create ( debtor = profile . debtor , id_number = profile . id_number , cell = profile . cell ) else : pass
Create a Debtor instance for a created Profile instance.
Create a Debtor instance for a created Profile instance .
"""Create a Debtor instance for a created Profile instance."""
sender