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.2.tar.gz
(2.1 kB
view details)
File details
Details for the file dj-static-0.0.2.tar.gz.
File metadata
- Download URL: dj-static-0.0.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a70b4767d336a3b476cbbdfc8c36589bcf14869200ffb2d5b235fcfe9d27d0
|
|
| MD5 |
1227db87101fde15b71a8c0e6777ad49
|
|
| BLAKE2b-256 |
7f21e96719dfcd65c506bbc222b31f8ec90afaea7f6e4003f1194229fcd86d69
|