summaryrefslogtreecommitdiffstats
path: root/module/web/pyload
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-02 13:44:26 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-02 13:44:26 +0200
commita5fddf6006f69a2540fa002bed125e9b90d1be08 (patch)
treefc13678169f184a1a6b1ffe4088790ed5addfb14 /module/web/pyload
parentreconnect fix (diff)
downloadpyload-a5fddf6006f69a2540fa002bed125e9b90d1be08.tar.xz
settings fix
Diffstat (limited to 'module/web/pyload')
-rw-r--r--module/web/pyload/templatetags/__init__.py0
-rw-r--r--module/web/pyload/templatetags/contains.py14
2 files changed, 14 insertions, 0 deletions
diff --git a/module/web/pyload/templatetags/__init__.py b/module/web/pyload/templatetags/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/module/web/pyload/templatetags/__init__.py
diff --git a/module/web/pyload/templatetags/contains.py b/module/web/pyload/templatetags/contains.py
new file mode 100644
index 000000000..ed6225a95
--- /dev/null
+++ b/module/web/pyload/templatetags/contains.py
@@ -0,0 +1,14 @@
+from django import template
+register = template.Library()
+
+@register.filter()
+def contains(value, arg):
+ """
+ Usage:
+ {% if text|contains:" http://" %}
+ This is a link.
+ {% else %}
+ Not a link.
+ {% endif %}
+ """
+ return arg in value