Django templates often contain text/media that doesn't affect application's functionality. These texts belong to product people, but because they are stored in template files, are modified by developers. Such editing is slow and continious delivery pipelines treat it the same way as code changes.
Product manager finds a typo on the landing page, he has to describe it to developer. Developer has to interrupt the flow and make a trivial change in the template and commit/push the fix. Build system runs all tests and eventually deploys corrected text to the test site. The manager reviews the fix and initiates deployment to production. Build system spins its wheel again and finally fixed typo lands on production site.
Product manager finds a typo on the landing page. He opens Django TMS interface and fixes it. He previews his change right there. He deploys the change to both testing and production.
- Support
{% include "tms/intro.md" %}
template syntax; - Render markdown files to Django templates on-the-go if
DEBUG=True
; - Render to HTML templates in
django collectstatic
; - Pack all rendered HTML templates into
.tar.gz
file; - Serve cached pre-rendered HTML template packs.
Install python package:
pip install django-tms
Add it to settings.py
. INSTALLED_APPS
, TEMPLATES
, all that stuff.
Add templates/tms/
directory and put hello.md
there:
# Hello, *world*!
Django-TMS is like a magic!
Inside regular template include the new snippet:
<html>
<body>
{% include "tms/hello.md" %}
</body>
</html>