Actually display submitted stuff on the mainpage. Crappy, but working!

This commit is contained in:
Christopher Allan Webber 2011-05-06 10:01:26 -05:00
parent 12b6ecac0f
commit 4c1e752a08
2 changed files with 19 additions and 1 deletions

View File

@ -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 %}

View File

@ -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):