Opened 11 years ago

Closed 11 years ago

#6186 closed (invalid)

New signal needed - post_create

Reported by: italomaia Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords: signals
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Well, i was thinking, if there is a post_delete signal, why not a post_create signal? Like, if someone wants something
to be executed when a model is created agains the database, and NOT when it is saved!
It would be very useful for counters, for example.

Change History (1)

comment:1 Changed 11 years ago by pytechd <pytechd@…>

Resolution: invalid
Status: newclosed

You can already do this (from source:/django/trunk/tests/modeltests/signals/

def post_save_test(sender, instance, **kwargs):
    print 'post_save signal,', instance
    if 'created' in kwargs:
        if kwargs['created']:
            print 'Is created'
            print 'Is updated'

dispatcher.connect(post_save_test, signal=models.signals.post_save)
Note: See TracTickets for help on using tickets.
Back to Top