Viewlet managers for CSS and JavaScript should be ordered
Bug #745513 reported by
Douglas Cerna
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
New
|
Low
|
Unassigned |
Bug Description
There's no way to control the order in which file resources are included.
Regular viewlet managers use this method for sorting viewlets:
-------
def sort(self, viewlets):
"""Sort the viewlets.
"""
# By default, use the standard Python way of doing sorting.
return sorted(viewlets, lambda x, y: cmp(x[1], y[1]))
-------
which I understand compares the viewlet objects. And as far as I can tell, viewlet objects have no explicit comparison magic methods, right?
Changed in schooltool: | |
importance: | Undecided → Low |
To post a comment you must log in.
Right. You could probably hack something with overriding __cmp__, but don't forget to keep (a > b) == (b < a).
So yes, we do need decent sort control.