from django.db.models.signals import post_save
class MyModel(models.Model):
int = models.PositiveIntegerField(unique=True)
def added (sender, instance, **kwargs):
print 'Added'
post_save.connect(added,MyModel)
When I do:
MyModel.objects.create(int=12345).save()
nothing happened
Am i lose something?
After Edit:
Not working.