skip to navigation
skip to content

django-progressbarupload 0.1.5

Progress bar upload for Django

Latest Version: 0.1.6


[![Build Status](](

django-progressbarupload is a simple Django application that instantiates an HTML5 upload progress bar when the user submit a form with files (a form having basically FileField(s) and/or ImageField(s), and an enctype="multipart/form-data").


Quick start

Requirements :
* Django 1.4.3 (tested).
* django.contrib.staticfiles app to serve static files

1. Install the app

pypi version

pip install django-progressbarupload

development version

pip install -e git+

2. Add progressbarupload to your INSTALLED_APPS in your settings

INSTALLED_APPS += ('progressbarupload', )

3. Add "progressbarupload.uploadhandler.ProgressBarUploadHandler" to your FILE_UPLOAD_HANDLERS setting


4. Include the progressbarupload URLconf in your project

(r'^progressbarupload/', include('progressbarupload.urls')),


### ModelAdmin

Set the ```change_form_template``` and ```add_form_template``` attributes in your ModelAdmin to 'progressbarupload/change_form.html'.

from django.contrib import admin
from my_awesome_app.models import MyAwesomeModelWithFiles

class MyAwesomeModelWithFiles(admin.ModelAdmin):
change_form_template = 'progressbarupload/change_form.html'
add_form_template = 'progressbarupload/change_form.html', UploadFileModelAdmin)

### Form and ModelForm

To use a progress bar in your custom ModelForm or Form, load the progress_bar template tag set ```{% load progress_bar %}``` in the template, and use the following template tags ```{% progress_bar_media %}``` between <head> tags to load javascript files and ```{% progress_bar %}``` where you and to display the progress bar.

{% load progress_bar %}

{% progress_bar_media %}

<form enctype="multipart/form-data" method="post" action=".">
{% csrf_token %}
{{ form }}
{% progress_bar %}
<input type="submit"/>

Further information

Make sure your browser renders HTML5 ```<progress>``` tag and uses data-* attribute (IE>10, FF>6.0, Chrome>8.0, Opera>11.0).

As Django has a unique TemporaryFileUploadHandler for all request.FILES. For ModelAdmin, if you have related models, using TabularInline, the upload progress will also be shown in the admin add/change form as soon as you use the right templates in your ModelAdmin (and even if your ModelAdmin doesn't contain any file upload).

Custom TemporaryFileUploadHandler copied from

Launch tests

It assumes you have installed virtualenvwrapper (

# get the application code
git clone
cd django-progressbarupload
# create a virtualenv
mkvirtualenv progressbarupload
add2virtualenv .
# install requirements for tests and django (set the django version you want to use)
pip install -r requirements/tests.txt django==1.4.3
# launch tests test --settings=progressbarupload.test_settings progressbarupload
File Type Py Version Uploaded on Size
django-progressbarupload-0.1.5.macosx-10.4-x86_64.exe (md5) MS Windows installer any 2013-02-04 72KB
django-progressbarupload-0.1.5.tar.gz (md5) Source 2013-02-04 20KB
  • Downloads (All Versions):
  • 24 downloads in the last day
  • 161 downloads in the last week
  • 829 downloads in the last month