[SCM] live-studio branch, master, updated. be51da814fb12d25dce46a7f078a46f5c89bd777

Chris Lamb lamby at debian.org
Fri Jul 30 02:52:35 UTC 2010


The following commit has been merged in the master branch:
commit 92b821d9abcddeaa5b132cd18b680be81d4c30c8
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Jul 29 14:19:01 2010 -0400

    Add templatetag to format an option list nicely.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>

diff --git a/live_studio/templatetags/__init__.py b/live_studio/templatetags/__init__.py
index 1ac47a2..5621305 100644
--- a/live_studio/templatetags/__init__.py
+++ b/live_studio/templatetags/__init__.py
@@ -2,6 +2,7 @@ from django.template import add_to_builtins
 
 from .library import register
 
+import text
 import media
 
 add_to_builtins('live_studio.templatetags')
diff --git a/live_studio/templatetags/text.py b/live_studio/templatetags/text.py
new file mode 100644
index 0000000..fbce483
--- /dev/null
+++ b/live_studio/templatetags/text.py
@@ -0,0 +1,13 @@
+from .library import register
+
+ at register.filter
+def command_line_options(options):
+    out = ""
+
+    for option in options:
+        if ' ' in option:
+            out += ' "%s"' % option
+        else:
+            out += ' %s' % option
+
+    return out.strip()

-- 
live-studio



More information about the debian-live-changes mailing list