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.

I may not be reading your description right, but it sounds like you
are not really saving this zip file, just processing what is in it,
correct? If that is the case, you don't need it in the model. You
could just create a form and view that take a zip file, unzip it and
do any processing. I do this to upload multiple pictures to a gallery
site.  I then overrode the admin list page for a model to have a
button by "Add Object" called "Add Multiple Objects" which has just
this form instead of the normal add object form.

If you a more complete explanation, let me know. But, if I am reading
your question wrong, this might not work.

Thanks,
John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to