dj-static
dj-static
pypi i dj-static
dj-static

dj-static

DEPRECATED - use WhiteNoise instead!

by heroku-python

0.0.6 (see all)License:BSD
pypi i dj-static
Readme

dj-static


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 <https://docs.djangoproject.com/en/1.5/howto/static-files/#admonition-serving-the-files>`_
the production use of its static file server for a number of reasons.
There exists, however, a lovely WSGI application aptly named `Static <http://lukearno.com/projects/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())
VersionTagPublished
0.0.6
9yrs ago
0.0.5
10yrs ago
0.0.4
10yrs ago
0.0.3
10yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate