Skip to main content
Jazzband https://img.shields.io/pypi/v/django-downloadview.svg https://img.shields.io/pypi/pyversions/django-downloadview.svg https://img.shields.io/pypi/djversions/django-downloadview.svg https://img.shields.io/pypi/dm/django-downloadview.svg GitHub Actions Coverage

django-downloadview makes it easy to serve files with Django:

  • you manage files with Django (permissions, filters, generation, …);

  • files are stored somewhere or generated somehow (local filesystem, remote storage, memory…);

  • django-downloadview helps you stream the files with very little code;

  • django-downloadview helps you improve performances with reverse proxies, via mechanisms such as Nginx’s X-Accel or Apache’s X-Sendfile.

Example

Let’s serve a file stored in a file field of some model:

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'),
)

Resources

Metadata

Release files for django-downloadview 2.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-downloadview 2.5.0
File Size Uploaded
django_downloadview-2.5.0.tar.gz 67.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-downloadview 2.5.0
File Interpreter ABI Platform
django_downloadview-2.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 103.3 kB

Release files / django_downloadview-2.5.0.tar.gz

Download URL django_downloadview-2.5.0.tar.gz
Size 67.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3bf0b0694711cadb4a9c1173cb21055a3f3be14c092e132ec3d69f14b4d8fdfe
BLAKE2b-256 checksum
How to use checksums
fcb27182dbce076e5f95105c2ef8c0f172cc1e6c09d990604cc901661d618d82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / django_downloadview-2.5.0-py3-none-any.whl

Download URL django_downloadview-2.5.0-py3-none-any.whl
Size 36.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9faa2e6a24ad521d19f9c16ae99010fcb921a8e9dd4e6db4972df72bdcfe726
BLAKE2b-256 checksum
How to use checksums
6a924df0306aa24a1f1888bca2697475491794a5d29b070104ba823f9583e5aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

2.5.0 This release

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.1.1

2 release files

2.1

2 release files

2.0

2 release files

1.10

2 release files

1.9

1 release file

1.8

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page