evildmp  committed afb2a92

Better way of checking whether a class can be used in a template

  • Participants
  • Parent commits 85668fb

Comments (0)

Files changed (1)

File semanticeditor/

     classes = CssClass.objects.all().order_by('category__name', 'verbose_name')
     # the class is allowed in the template if explicitly mentioned, or if no templates
     # are specified - useful, because many classes will be used across all templates  
-    return [c for c in classes if c.templates == [u''] or template in c.templates]
+    return [c for c in classes if template in c.templates] or classes