Skip to main content

This is a simple Django middleware utility that allows you to properly serve static assets from production with a WSGI server like Gunicorn.

Django doesn’t recommend the production use of its static file server for a number of reasons. There exists, however, a lovely WSGI application aptly named Static.

It is suitable for the production use of static file serving, unlike Django.

Usage

Configure your static assets in settings.py:

STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'

Then, update your wsgi.py file to use dj-static:

from django.core.wsgi import get_wsgi_application
from dj_static import Cling

application = Cling(get_wsgi_application())

Release files for dj-static-incuna 0.0.6

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

Source distribution (sdist)

Source distribution for dj-static-incuna 0.0.6
File Size Uploaded
dj-static-incuna-0.0.6.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dj-static-incuna 0.0.6
File Interpreter ABI Platform
dj_static_incuna-0.0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.0 kB

Release files / dj-static-incuna-0.0.6.tar.gz

Download URL dj-static-incuna-0.0.6.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4c6390688e3b2fa7c547755f1841c3b82dc01da91324f5926a26b272f5dedf5d
BLAKE2b-256 checksum
How to use checksums
6cb434a546a721d514ec745b48fc172bd6773922f56dd9658634250bd992d9cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dj_static_incuna-0.0.6-py2.py3-none-any.whl

Download URL dj_static_incuna-0.0.6-py2.py3-none-any.whl
Size 4.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e5f19deacd69a6b581eb721eef43375ebcaf36f853c6e75928f6b2adc50da2c2
BLAKE2b-256 checksum
How to use checksums
4fddcb8e76c2019dc6350643fac1e7a49b54f089452485e6aff80e01e9d57ebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

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