From 4c1e752a089313b11f872771f234c59d1b5b9982 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber
Date: Fri, 6 May 2011 10:01:26 -0500
Subject: [PATCH] Actually display submitted stuff on the mainpage. Crappy,
but working!
---
mediagoblin/templates/mediagoblin/root.html | 14 ++++++++++++++
mediagoblin/views.py | 6 +++++-
2 files changed, 19 insertions(+), 1 deletion(-)
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 @@
{% endif %}
+
+ {# temporarily, an "image gallery" that isn't one really ;) #}
+
+
+
+ {% for entry in media_entries %}
+ -
+
+
+ {% endfor %}
+
+
+
{% 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):