Example project for integrating Dropzone.js with Django.
Dropzone.js by Matias Meno is a javascript library for drag and drop file uploading. It is very light and simple to configure and extend. This example uses ImageField, but you can easily change that to using FileField instead.
I have earlier created django-jquery-file-upload, which integrates jquery-file-upload by Sebastian Tschan with Django. That project has a lot of functionality and tries to be a complete package of all you need. It also works on older browsers.
Django-dropzone-upload tries to be as minimal and simple to understand as possible, as it should be fairly easy to with Dropzone.js functionality.
We assume you have git, python and python-virtualenv already installed.
- Clone this repository: git clone https://github.com/sigurdga/django-dropzone-upload.git
- Change directory: cd django-dropzone-upload
- Create virtualenv: virtualenv venv
- Activate virtualenv: source venv/bin/activate
- Install dependencies into virtualenv: pip install -r requirements.txt
- Setup database: python manage.py syncdb
- Run development server: python manage.py runserver
- Open browser at localhost:8000
Dropzone.js claims to work for modern browsers:
- Chrome 7+
- Firefox 4+
- IE 10+
- Opera 12+ (Version 12 for MacOS is disabled because their API is buggy)
- Safari 6+
Django-dropzone-upload does not try to do anything more than Dropzone in its simplest form, so no delete, no listing of already uploaded, etc. in this project.
- Sigurd Gartmann for initial setup
- João Paulo Dubas created the
fileupload/response.py
initially for django-jquery-file-upload.
Released under the MIT license