Commit e6804ddd authored by Martin Lehoux's avatar Martin Lehoux

Merge branch 'feature-order-name' into 'master'

Feature: Order courses by name

See merge request !42
parents e44b0812 dc0ef829
......@@ -27,16 +27,16 @@ def home(request):
# Custom organization for course browser
courses = {
"A1": {
"tronc_commun": Course.objects.filter(year="1A", type="Tronc commun", isAccepted=True),
"electif": Course.objects.filter(year="1A", type="Electif")
"tronc_commun": Course.objects.filter(year="1A", type="Tronc commun", isAccepted=True).order_by('name'),
"electif": Course.objects.filter(year="1A", type="Electif").order_by('name')
},
"A2": {
"tronc_commun": Course.objects.filter(year="2A", type="Tronc commun", isAccepted=True),
"electif": Course.objects.filter(year="2A", type="Electif")
"tronc_commun": Course.objects.filter(year="2A", type="Tronc commun", isAccepted=True).order_by('name'),
"electif": Course.objects.filter(year="2A", type="Electif").order_by('name')
},
"A3": {
"tronc_commun": Course.objects.filter(year="3A", type="Tronc commun", isAccepted=True),
"electif": Course.objects.filter(year="3A", type="Electif")
"tronc_commun": Course.objects.filter(year="3A", type="Tronc commun", isAccepted=True).order_by('name'),
"electif": Course.objects.filter(year="3A", type="Electif").order_by('name')
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment