Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django wht post save signal not firing

class MyModel(models.Model):
    """ MyModel fields go """
    body = models.TextField(max_length=200)
    pub_date = models.DateTimeField(auto_now_add=True, auto_now=False)


def post_save_actions(sender, instance, created, **kwargs):
    if created:
        pass
        # post save actions if new instance is created,
        # do something with `instance` or another models
        # be careful about circular imports. m/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #wht #post #save #signal #firing
ADD COMMENT
Topic
Name
1+9 =