{ "info": { "author": "ouhouhsami", "author_email": "samuel.goldszmidt@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "========================\ndjango-progressbarupload\n========================\n\n[](https://travis-ci.org/ouhouhsami/django-progressbarupload)\n\ndjango-progressbarupload is a simple Django application that instantiates an HTML5 upload progress bar when the user submits a form with files (a form having basically FileField(s) and/or ImageField(s), and an enctype=\"multipart/form-data\").\n\n\n\n###Contributors\nThe following users have contributed:\n* [Iago Su\u00e1rez](https://github.com/iago-suarez)\n* [Andrew Brookins](https://github.com/abrookins)\n* [Callan Bryant](https://github.com/naggie)\n* [Mathieu Comandon](https://github.com/strycore)\n\nQuick start\n-----------\n\nRequirements :\n* Django 1.7.4 or above.\n* Python 2.7 or 3.4\n* django.contrib.staticfiles app to serve static files\n\n\n1. Install the app\n\n pypi version\n\n ```\n pip install django-progressbarupload\n ```\n\n development version\n\n ```\n pip install -e git+http://github.com/ouhouhsami/django-progressbarupload.git#egg=django-progressbarupload\n ```\n\n2. Add progressbarupload to your INSTALLED_APPS in your settings\n\n ```\n INSTALLED_APPS += ('progressbarupload', )\n ```\n\n3. Add \"progressbarupload.uploadhandler.ProgressBarUploadHandler\" to your FILE_UPLOAD_HANDLERS setting\n\n ```python\n FILE_UPLOAD_HANDLERS = (\n \"progressbarupload.uploadhandler.ProgressBarUploadHandler\",\n \"django.core.files.uploadhandler.MemoryFileUploadHandler\",\n \"django.core.files.uploadhandler.TemporaryFileUploadHandler\",\n )\n ```\n\n4. Include the progressbarupload URLconf in your project urls.py\n\n ```\n (r'^progressbarupload/', include('progressbarupload.urls')),\n ```\n\n5. In your settings file, if you don't want to include jquery with {% progress_bar_media %}, then set:\n\n ``` python\n PROGRESSBARUPLOAD_INCLUDE_JQUERY = False\n ```\n\nUsage\n-----\n\n### ModelAdmin\n\nSet the ```change_form_template``` and ```add_form_template``` attributes in your ModelAdmin to 'progressbarupload/change_form.html'.\n\n\n from django.contrib import admin\n from my_awesome_app.models import MyAwesomeModelWithFiles\n\n class MyAwesomeModelWithFiles(admin.ModelAdmin):\n change_form_template = 'progressbarupload/change_form.html'\n add_form_template = 'progressbarupload/change_form.html'\n\n admin.site.register(MyAwesomeModelWithFiles, UploadFileModelAdmin)\n\nDemo\n----\n\nThis app includes a demo app, just go inside testapp dir and run\n\n python manage.py migrate\n python manage.py runserver\n\nthen go to http://127.0.0.1:8000/admin or http://127.0.0.1:8000/admin http://127.0.0.1:8000/testapp/form or http://127.0.0.1:8000/testapp/modelform\n\n\n### Form and ModelForm\n\nTo 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
tags to load javascript files and ```{% progress_bar %}``` where you and to display the progress bar.\n\n\n {% load progress_bar %}\n\n \n \n \n {% progress_bar_media %}\n \n\n \n \n \n \n\n\nFurther information\n-------------------\n\nMake sure your browser renders HTML5 ```