On 07/11/15 06:03, Becka R. wrote:
> How can I display the data in the template so the shifts are sorted by
> day, and then by meal?

Try saving the weekday as integer (0-6), sorting using integer is much
easier than sorting using strings in non-alphabetic order :)
You can than e.g. define a default ordering for your model:
https://docs.djangoproject.com/en/1.8/ref/models/options/#ordering
or sort it in the view:
https://docs.djangoproject.com/en/1.8/ref/models/querysets/#django.db.models.query.QuerySet.order_by

--
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/563E7D3B.3060407%40ist-total.org.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to