aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/views.py
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2011-05-16 14:55:05 +0200
committerSebastian Spaeth <Sebastian@SSpaeth.de>2011-05-16 14:55:05 +0200
commit1ab8467320db7083bd651a26191cbecbdaa0f38d (patch)
tree9188d1091ca7d82454a56399304c93518ed97078 /mediagoblin/user_pages/views.py
parent400125148f82e0e67c70a25724d940d331063b44 (diff)
downloadmediagoblin-1ab8467320db7083bd651a26191cbecbdaa0f38d.tar.lz
mediagoblin-1ab8467320db7083bd651a26191cbecbdaa0f38d.tar.xz
mediagoblin-1ab8467320db7083bd651a26191cbecbdaa0f38d.zip
Show images in reverse submit order
Fixes bug #327. Just do a .sort('created', DESCENDING) on Media when showing them to show the latest first. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r--mediagoblin/user_pages/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index 2c9792fa..c99556c2 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from webob import Response, exc
+from pymongo import DESCENDING
from mongokit import ObjectId
import wtforms
@@ -29,7 +30,7 @@ def user_home(request):
medias = request.db.MediaEntry.find({
'uploader': user,
- 'state': 'processed'})
+ 'state': 'processed'}).sort('created', DESCENDING)
template = request.template_env.get_template(
'mediagoblin/user_pages/user.html')