skip to navigation
skip to content

Not Logged In

dj-static 0.0.6

Serve production static files with Django.

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())
 
File Type Py Version Uploaded on Size
dj-static-0.0.6.tar.gz (md5) Source 2014-07-11 3KB
  • Downloads (All Versions):
  • 1065 downloads in the last day
  • 5865 downloads in the last week
  • 25394 downloads in the last month