summaryrefslogtreecommitdiffstats
path: root/coffin/contrib/markup
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-09-26 17:44:57 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-09-26 17:44:57 -0400
commit35954df3196e46653b6b66ea80fe95dfacc7484d (patch)
treef3949a46037f2f162639b3bbe604013491ba06dc /coffin/contrib/markup
parent98360b7821240c21ec9b7adde155e4bcaf7bfdd5 (diff)
downloadaskbot-35954df3196e46653b6b66ea80fe95dfacc7484d.tar.gz
askbot-35954df3196e46653b6b66ea80fe95dfacc7484d.tar.bz2
askbot-35954df3196e46653b6b66ea80fe95dfacc7484d.zip
stated working on switch to jinja
Diffstat (limited to 'coffin/contrib/markup')
-rw-r--r--coffin/contrib/markup/__init__.py0
-rw-r--r--coffin/contrib/markup/models.py0
-rw-r--r--coffin/contrib/markup/templatetags/__init__.py0
-rw-r--r--coffin/contrib/markup/templatetags/markup.py15
4 files changed, 15 insertions, 0 deletions
diff --git a/coffin/contrib/markup/__init__.py b/coffin/contrib/markup/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coffin/contrib/markup/__init__.py
diff --git a/coffin/contrib/markup/models.py b/coffin/contrib/markup/models.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coffin/contrib/markup/models.py
diff --git a/coffin/contrib/markup/templatetags/__init__.py b/coffin/contrib/markup/templatetags/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coffin/contrib/markup/templatetags/__init__.py
diff --git a/coffin/contrib/markup/templatetags/markup.py b/coffin/contrib/markup/templatetags/markup.py
new file mode 100644
index 00000000..0d6b92f9
--- /dev/null
+++ b/coffin/contrib/markup/templatetags/markup.py
@@ -0,0 +1,15 @@
+"""Makes the template filters from the ``django.contrib.markup`` app
+available to both the Jinja2 and Django engines.
+
+In other words, adding ``coffin.contrib.markup`` to your INSTALLED_APPS
+setting will enable the markup filters not only through Coffin, but
+also through the default Django template system.
+"""
+
+from coffin.template import Library as CoffinLibrary
+from django.contrib.markup.templatetags.markup import register
+
+
+# Convert Django's Library into a Coffin Library object, which will
+# make sure the filters are correctly ported to Jinja2.
+register = CoffinLibrary.from_django(register) \ No newline at end of file