Fixing small errors
This commit is contained in:
parent
d3afd56946
commit
d4435c02ab
4 changed files with 17 additions and 4 deletions
|
|
@ -71,7 +71,7 @@ class AttributionView(TemplateView):
|
|||
def section_periods(request, pk):
|
||||
""" Return all periods from a section (JSON) """
|
||||
section = get_object_or_404(Section, pk=pk)
|
||||
periods = [(p.id, p.dates) for p in section.period_set.all()]
|
||||
periods = [(p.id, p.dates) for p in section.period_set.all().order_by('start_date')]
|
||||
return HttpResponse(json.dumps(periods), content_type="application/json")
|
||||
|
||||
def section_classes(request, pk):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue