diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-06 10:01:26 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-06 10:01:26 -0500 |
commit | 4c1e752a089313b11f872771f234c59d1b5b9982 (patch) | |
tree | 7562a0be73964ffb6a1ab985915f6a599c494ea9 | |
parent | 12b6ecac0f5188f4b4e07f9fd70e0c4a4a59a5ae (diff) | |
download | mediagoblin-4c1e752a089313b11f872771f234c59d1b5b9982.tar.lz mediagoblin-4c1e752a089313b11f872771f234c59d1b5b9982.tar.xz mediagoblin-4c1e752a089313b11f872771f234c59d1b5b9982.zip |
Actually display submitted stuff on the mainpage. Crappy, but working!
-rw-r--r-- | mediagoblin/templates/mediagoblin/root.html | 14 | ||||
-rw-r--r-- | mediagoblin/views.py | 6 |
2 files changed, 19 insertions, 1 deletions
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index d6fffb8e..06a89f3f 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -36,4 +36,18 @@ </p> {% endif %} + + {# temporarily, an "image gallery" that isn't one really ;) #} + + <div> + <ul> + {% for entry in media_entries %} + <li> + <img src="{{ request.app.public_store.file_url( + entry['media_files']['thumb']) }}" /> + </li> + {% endfor %} + </ul> + </div> + {% endblock %} diff --git a/mediagoblin/views.py b/mediagoblin/views.py index 1081ce29..3728d4aa 100644 --- a/mediagoblin/views.py +++ b/mediagoblin/views.py @@ -22,11 +22,15 @@ import wtforms from mediagoblin import models def root_view(request): + media_entries = request.db.MediaEntry.find( + {u'state': u'processed'}) + template = request.template_env.get_template( 'mediagoblin/root.html') return Response( template.render( - {'request': request})) + {'request': request, + 'media_entries': media_entries})) class ImageSubmitForm(wtforms.Form): |