Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#364 closed defect (fixed)

_{post,pre}_file hooks

Reported by: maurycy Owned by: Adrian Holovaty
Component: Metasystem Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


17:21 < maurycy> hey. is there any way to parse data after file upload? any
                 file upload hooks or something?
17:22 < mmarshall> would _post_save work?
17:31 < maurycy> mmarshall: no. it doesn't work - post_save is called after
                 database .save(), nor file upload
17:32 < mmarshall> But you could then open the file, process it, then save it
17:32 < maurycy> mmarshall: i'd not like to wait for .save() to process the file
17:33 < mmarshall> Then I think you should take a look at the source.
17:34 < mmarshall> Check out django/core/meta/
17:34 < mmarshall> And maybe django/core/meta/
17:35 < maurycy> mmarshall: there should be _post_file_upload() etc.
17:36 < mmarshall> maurycy: I agree.

We can also think about more generic subsystem of hooks called after and before various actions, like file upload, image resize etc., etc.

Change History (2)

comment:1 by maurycypw@…, 19 years ago

See #421 ticket. It introduces new event framework, that should be used here.

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

This is no longer an issue in the magic-removal branch, where you can override save() on models.

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