{"id":23552,"library":"dj-static","title":"dj-static","description":"A Django middleware that serves static files in production using the static server from Werkzeug. Current version 0.0.6, no longer actively maintained. Development ceased around 2015.","status":"deprecated","version":"0.0.6","language":"python","source_language":"en","source_url":"https://github.com/kennethreitz/dj-static","tags":["django","static-files","wsgi","deprecated"],"install":[{"cmd":"pip install dj-static","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core dependency for serving static files","package":"Django","optional":false},{"reason":"Backend static file server (fork of werkzeug's)","package":"static3","optional":false}],"imports":[{"note":"The middleware function is Cling, not CLERY.","wrong":"from dj_static import CLERY","symbol":"CLERY","correct":"from dj_static import Cling"}],"quickstart":{"code":"import os\nfrom django.core.wsgi import get_wsgi_application\nfrom dj_static import Cling\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')\napplication = Cling(get_wsgi_application())","lang":"python","description":"Wrap your Django WSGI application with Cling to serve static files in production. Run with a WSGI server like gunicorn."},"warnings":[{"fix":"Use 'from dj_static import Cling'.","message":"Import as 'dj_static' (underscore), not 'dj-static' (hyphen). The package name on PyPI uses a hyphen, but Python module naming conventions use an underscore.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace with whitenoise: install 'pip install whitenoise' and follow its documentation.","message":"The library is no longer maintained. It relies on the 'static3' package, which itself is unmaintained. Consider switching to WhiteNoise or Django's built-in static file handling with a CDN.","severity":"deprecated","affected_versions":"0.0.6"},{"fix":"If using ASGI (Django Channels, Daphne, Uvicorn), use WhiteNoise with ASGI support.","message":"Only works with WSGI servers (e.g., gunicorn, uWSGI). It does not support ASGI.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Correct import: 'from dj_static import Cling'.","cause":"Trying to import 'dj-static' (with hyphen) instead of 'dj_static' (underscore).","error":"ImportError: No module named 'dj_static'"},{"fix":"Use 'Cling' (capital C, lowercase ling).","cause":"Using uppercase 'CLERY' from an outdated example.","error":"AttributeError: module 'dj_static' has no attribute 'CLERY'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}