Login

Tag "STATIC_ROOT"

Snippet List

Serve from STATIC_ROOT

Assuming you have defined STATIC_ROOT correctly in settings.py, and have installed staticfiles_urlpatterns() in urls.py (as demoed in the code, taken from Django's staticfiles docs), the code from static_root_finder.py can be used to simply serve static files in development from STATIC_ROOT directly, avoiding complicated setups in case we just want to have a bunch of static files in one directory.

  • staticfiles
  • STATIC_ROOT
Read More

1 snippet posted so far.