You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

User:RoySmith/Django notes

From Wikitech-static
Jump to navigation Jump to search

These are some notes from my experiences getting a Django app up and running in the toolforge kubernetes environment. The example given here are using python3.7 and Django 2.2.

See Help:Toolforge/Web#Python (uWSGI) for the basics.

How to serve static files

This is surprisingly complicated to do right, partly because there is no single definition of "right". There are many different strategies; what works for a small website in a development environment will be completely inappropriate for a large production site. Django's static support is flexible enough to handle many different setups, but with that flexibility comes complexity.

There's two different cases to consider: development and production.