Generic download views for Django.
Project description
Django-DownloadView provides (class-based) generic download views for Django.
Example, in some urls.py:
from django.conf.urls import url, url_patterns
from django_downloadview import ObjectDownloadView
from demoproject.download.models import Document # A model with a FileField.
# ObjectDownloadView inherits from django.views.generic.BaseDetailView.
download = ObjectDownloadView.as_view(model=Document, file_field='file')
url_patterns = ('',
url('^download/(?P<slug>[A-Za-z0-9_-]+)/$', download, name='download'),
)
Ressources
online documentation: http://django-downloadview.readthedocs.org
code repository: https://github.com/benoitbryon/django-downloadview
bugtracker: https://github.com/benoitbryon/django-downloadview/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-downloadview-1.0.zip
(15.3 kB
view hashes)