On Jan 7, 7:32 am, dmishe <dmi...@gmail.com> wrote: > Hey. > > I have FielField in my model for user to upload ZIP-archives. I want > to unpack that zip, place some files in some dirs and delete it just > after user uploaded it in admin. > > How can i do this? Model's save won't work because it gets called > everytime model is saved regardless of were the file uploaded again or > not. Custom storage/upload handler seems too complicated for this.
Check out the save_model() method that you can override in your ModelAdmin class. You can add custom logic there. http://docs.djangoproject.com/en/dev/ref/contrib/admin/#save-model-self-request-obj-form-change Best, BN --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---