You are browsing a read-only backup copy of Wikitech. The live site can be found at

User:RoySmith/Django notes

From Wikitech-static
< User:RoySmith
Revision as of 15:48, 20 January 2020 by imported>RoySmith (start page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.