1. evildmp
  2. semanticeditor


Daniele Procida  committed 1e39248 Merge

merge better class list

  • Participants
  • Parent commits 27a36fa, b183032
  • Branches default

Comments (0)

Files changed (1)

File semanticeditor/models.py

View file
     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 == [] or template in c.templates]
+    return [c for c in classes if template in c.templates] or classes