Opened 13 years ago

Last modified 13 years ago

#53 closed defect (FIXED)

Show media in reverse submitted order in galleries

Reported by: Sebastian Spaeth Owned by: Sebastian Spaeth
Priority: trivial Milestone: 0.0.2
Component: Keywords:
Cc: Parent Tickets:

Description

Main page and user page show media galleries. They should be
showing them in reverse order they had been submitted and not
according to ascending document id as they are now.

For that we simply need to append:

::

    .sort({'created': -1})

to the find() query.

While we are it, we should add

::

    .skip(0).limit(30);

too (using variables with those defaults), so we can easily do
pagination later.



Attachments (1)

0001-Show-images-in-reverse-submit-order.patch (1.8 KB ) - added by Sebastian Spaeth 13 years ago.
0001-Show-images-in-reverse-submit-order.patch

Download all attachments as: .zip

Change History (6)

comment:1 by Sebastian Spaeth, 13 years ago

Just discovered, in python this would be:

::

    .sort('created', pymongo.DESCENDING).skip(0).limit(30)



comment:2 by Christopher Allan Webber, 13 years ago

Milestone: 0.0.2

by Sebastian Spaeth, 13 years ago

0001-Show-images-in-reverse-submit-order.patch

comment:2 by Sebastian Spaeth, 13 years ago

Patch that achieves this.



comment:3 by Christopher Allan Webber, 13 years ago

Status: NewClosed
Done! Closed.



comment:4 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/327 .

Note: See TracTickets for help on using tickets.