Django template filter to implement http://xkcd.com/1288/
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
templatetags
.gitignore
LICENSE
README.md
__init__.py
tests.py

README.md

substitutions

Django template filter to implement http://xkcd.com/1288/

Usage

Add it to your installed apps:

INSTALLED_APPS = (
    ...
    'substitutions',
    ...
)

In your template, load the template tags and add substitute as a filter:

{% load substitutions %}

{% block content %}
<h1>{{ post.title }}</h1>
<p>{{ post.content|substitute }}</p>
{% endblock %}

TODO

  • Basic tests
  • [] Word boundaries!
  • [] Make pip installable

License

© 2015 Dan Gayle, MIT License