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.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for dj-static-0.0.1.tar.gz
Algorithm Hash digest
SHA256 39902d1c8e744ca3c8e729f8aea838101f6dff40e670285f4c6aad9351654a19
MD5 97e988fb4fa6544b059a48ac571729eb
BLAKE2b-256 5826ccb2ab989247213d5c5f11aa78e85ef8673b53ecd688882dda13f1d049d7

See more details on using hashes here.

Provenance

Supported by

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