aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-05 15:58:35 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-05 15:58:35 -0500
commit2262b2a9e1aad834bce8782216c3d8068a008618 (patch)
treee663a3b4081311955ef684d4b90563b680c7b54c /mediagoblin/views.py
parent9038c9f9acc4cfa257a52def2b292e6142e7d86a (diff)
downloadmediagoblin-2262b2a9e1aad834bce8782216c3d8068a008618.tar.lz
mediagoblin-2262b2a9e1aad834bce8782216c3d8068a008618.tar.xz
mediagoblin-2262b2a9e1aad834bce8782216c3d8068a008618.zip
Made a simple template rendering view and switched a bunch of code over to using it
Diffstat (limited to 'mediagoblin/views.py')
-rw-r--r--mediagoblin/views.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/mediagoblin/views.py b/mediagoblin/views.py
index 3bff3974..5b6d9773 100644
--- a/mediagoblin/views.py
+++ b/mediagoblin/views.py
@@ -22,6 +22,15 @@ def root_view(request):
{u'state': u'processed'}).sort('created', DESCENDING)
return render_to_response(
- request,
- 'mediagoblin/root.html',
+ request, 'mediagoblin/root.html',
{'media_entries': media_entries})
+
+
+def simple_template_render(request):
+ """
+ A view for absolutely simple template rendering.
+ Just make sure 'template' is in the matchdict!
+ """
+ template_name = request.matchdict['template']
+ return render_to_response(
+ request, template_name, {})