You would order them on the model level or on the view level. In the
model, you can set ordering with the Meta class 'ordering' parameter.
In the view, you would just add .order_by() to your query. Check out
these thinks:

http://docs.djangoproject.com/en/dev/ref/models/options/#ordering

http://docs.djangoproject.com/en/dev/topics/db/queries/#id3

On Apr 16, 10:56 am, Ariel <isaacr...@gmail.com> wrote:
> Hi everybody:
>
> I have a little question that is simple but I haven't found it in the
> documentation.
> How could I order the comments by date ???
> This is when I show them in the template:
> {% load comments %}
>
> {% get_comment_list for object as comment_list %}
>
> {% for comment in comment_list %}
> {{ comment.submit_date|time:"H:i"}}
>
> {{ comment.user_name}}
> {{ comment.comment}}
> {% endfor %}
>
> How could I order the comments ???
> Thanks in advance.
> Regards
> Ariel
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to