1. evildmp
  2. semanticeditor


evildmp  committed b183032

better way of getting class list in editor

  • Participants
  • Parent commits 1b87456
  • Branches betterclasslist

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