Skip to main content

Serve production static files with Django.

Project description

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

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 StaticCling

application = StaticCling(get_wsgi_application())

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

dj-static-0.0.4.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file dj-static-0.0.4.tar.gz.

File metadata

  • Download URL: dj-static-0.0.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dj-static-0.0.4.tar.gz
Algorithm Hash digest
SHA256 69b881068a12fec213118031c5576750b1d6b46d725f5eee41a7b94ca70c810c
MD5 cbce42f3c460ff638948896536cfe76f
BLAKE2b-256 a2b9f8f3faca01d8079dea3fb8f609bf0f4bfc216055dacd6ca909d5fc3ae9c9

See more details on using hashes here.

Supported by

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