Opened 7 years ago

Closed 7 years ago

#7162 closed (invalid)

created keyword not sent to signal pre_save

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


kwargs does not have a created keyword, EVER. This seems to be a error as one could want
to change a object before it is create.
def pre_save(sender, instance, signal, *args, kwargs):

if 'created' in kwargs:

if kwargscreated?:

print "some stuff"

dispatcher.connect(pre_save, signal=signals.pre_save, sender=Sender)

print "some stuff" is never called.

Change History (1)

comment:1 Changed 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

If you want to do something before the object saves, use the pre_save signal. If you want to do something before it has been completely instantiated, use the pre_init signal. Similarly, post_save and post_init are available.

Note: See TracTickets for help on using tickets.
Back to Top