File tree 2 files changed +10
-1
lines changed 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,15 @@ def get_absolute_url(self):
117
117
def __str__ (self ):
118
118
return self .python_name
119
119
120
+ @property
121
+ def ordered_scripts (self ):
122
+ script_objects = {s .name : s for s in self .scripts .all ()}
123
+ ordered = [
124
+ script_objects .pop (sc ) for sc in self .module_scripts .keys () if sc in script_objects
125
+ ]
126
+ ordered .extend (script_objects .items ())
127
+ return ordered
128
+
120
129
@property
121
130
def module_scripts (self ):
122
131
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ <h2 class="card-header" id="module{{ module.pk }}">
37
37
{% endif %}
38
38
</ div >
39
39
</ h2 >
40
- {% with scripts=module.scripts.all %}
40
+ {% with scripts=module.ordered_scripts %}
41
41
{% if scripts %}
42
42
< table class ="table table-hover scripts ">
43
43
< thead >
You can’t perform that action at this time.
0 commit comments