Welcome to Django Privates’s documentation!

Simple private media integration for Django.

Run CI Code linting Coverage status

python-versions django-versions pypi-version

Django supports file uploads for user-generated content out of the box, which is typically public - think of images, videos…

However, often you want to expose files only to correctly authenticated users because they have a sensitive nature, for example invoice PDFs or tenant-specific documents.

django-privates achieves the latter while being as convenient as Django’s core FileField and derivatives.

Features

  • Provides a default private media storage, configurable via settings

  • Private model field variants for FileField and ImageField

  • Easy admin integration

  • Performant file serving through sendfile (supports nginx, apache, runserver,…)

Indices and tables