Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 templatetags
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 __init__.py
Octocat-spinner-32 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

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

License

MIT

Something went wrong with that request. Please try again.