10

I met the django-uploadify (multiple file uploading) application, but the only template-use is described in wiki of the project. I need to integrate it with django admin. Any ideas?

megido
  • 4,135
  • 6
  • 29
  • 33
  • 1
    [django-photologue](http://code.google.com/p/django-photologue/source/browse/trunk/photologue/models.py#202) can upload zip files and create galleries from them, if you need bulk upload that is. – Davor Lucic Jun 03 '11 at 11:02
  • aonther aproximation coud be upload to a ftp folder / amazon S3 or similar, and process it in django (administration only need the path to the folder) – Mordi Jun 03 '11 at 13:15
  • filebrowser-safe package which a django-based CMS package named Mezzanine used. – Blackdoor May 30 '20 at 02:19

3 Answers3

0

Personally I found this package to be painful when I attempted to do this locally. It is 7 years old and not maintained. django-filer is a more modern implementation that has this exact functionality built into the admin panel, it was quick to set up and it seems to be maintained a lot better. And the UI is excellent!

If your really set on using uploadify my attempt was quite painful. When I went to the website to download the uploadify jQuery plugin it was a paid download. After looking a bit I found a fork, and was able to get it going locally, but because the python package is old it required a lot of changes from python 2.7..

To integrate this with your project in the admin will definitely require you to write your own custom admin template. In your admin.py you would have to override the default template and methods, this faq has some insights. In your new template you would include the uploadify jquery script and put the upload file field inside the form where your model fields would be. When you upload files the signal sender in the package will fire, and you would just have to intercept the signal and handle it with your intended logic

wdfc
  • 374
  • 4
  • 9
0

@rebus and @Mordi have good suggestions; one of those is probably your best bet. Still...

The current implementation of file uploads in web browsers is single file only. That's a limitation of the HTML standards and the browsers themselves. When you see multiple file upload capability (all at once / select multiple) in some web app, something like Flash or Java is in play. You could potentially use a Flash or Java applet (check out Uploadify - about the easiest to work with you'll find), if you wanted, but you'd have to do some work tying it into Django: namely mapping the output of the applet to the input the Django Admin expects on POST.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
  • Have you tried django-uploadify? If so, how to integrate it to django admin and tie it to my models? – megido Jun 03 '11 at 20:02
  • Nope, never tried it, but that should make it all the easier. Maybe you should edit your question / post a new one concerning integrating that with Django admin. – Chris Pratt Jun 03 '11 at 21:00
  • changed to topic about django-uploadify – megido Jun 03 '11 at 21:30
-1

Very easy to implement multiple image upload with this project:

https://github.com/tstone/django-uploadify

Josir
  • 1,282
  • 22
  • 35