turn simpletal optional tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 17 Feb 2009 22:37:03 +0100
branchtls-sprint
changeset 705 937dd226f72a
parent 704 0c2c8f0a6ded
child 706 8be68582abb0
turn simpletal optional
schema.py
--- a/schema.py	Tue Feb 17 22:34:18 2009 +0100
+++ b/schema.py	Tue Feb 17 22:37:03 2009 +0100
@@ -954,9 +954,14 @@
 # translation
 PERM_USE_TEMPLATE_FORMAT = _('use_template_format')
 
+from cubicweb.mttransforms import HAS_TAL
+
 class FormatConstraint(StaticVocabularyConstraint):
-    need_perm_formats = (_('text/cubicweb-page-template'),
-                         )
+    if HAS_TAL:
+        need_perm_formats = (_('text/cubicweb-page-template'),)
+    else:
+        need_perm_formats = ()
+        
     regular_formats = (_('text/rest'),
                        _('text/html'),
                        _('text/plain'),