Skip to main content

Protected files in django

Project description


=====================
django-private-files
=====================


This application provides utilities for controlling access to static files based on
conditions you can specify within your Django application.
It provides a ``PrivatedFileField`` model field and appropriate signals for monitoring access to static content.
The basic goal is that you should be able to specify permissions for each ``PrivateFileField`` instance in
one method (or callable) and leave the rest to django-private-files.
Additionally you should be able to switch server (eg. from nginx to lighttpd) without hassle and remove
this application from your project without changes to your database.


It supports the following methods for limiting access to files:

* Basic - files are served with Python (not recommended for production if you have another choice)
* Nginx (X-Accel-Redirect) - you can specify protected locations within your nginx configuration file
* xsendfile - Apache (with mod_xsendfile), lighttpd and cherokee (not tested yet)


It's currently been tested with Django (1.9, 1.10, 1.11 and 2.0), Apache and Nginx. It should work with older
versions of django. Cherokee and lighttpd use the same mechanism as Apache mod_xsendfile, so
it should work, but it's not been tested or documented.

The full documentation for the project can be found on `Read the Docs <http://django-private-files.rtfd.org/>`_ .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-private-files-1.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file django-private-files-1.0.tar.gz.

File metadata

File hashes

Hashes for django-private-files-1.0.tar.gz
Algorithm Hash digest
SHA256 fafcdb9a0adb445dcaaa2a2cb1e129bc59be8937d6d00ef5cb9271970b9b2225
MD5 a5b880f7ac48f051187503da87155c68
BLAKE2b-256 16f93394e2fdfc5dd1f71cdcfe9f9b079fff21494f8e2658a5c072fdb8197cb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page