diff options
author | luxagraf <sng@luxagraf.net> | 2012-11-22 22:14:34 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-11-22 22:14:34 +0000 |
commit | 5ec4e9957220eda531ada80ae2969b3c4cd0bcce (patch) | |
tree | c90a5cbf30fde20ceaee287d157301d5c303a556 /app/pages | |
parent | 83e49fa3c3ea9b9b3f74b7302df8825aaf4e3d18 (diff) |
tweaked Pages template loader to allow for custom templates based on the %s.html %(slug) model.
Diffstat (limited to 'app/pages')
-rw-r--r-- | app/pages/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/pages/views.py b/app/pages/views.py index 016c2ed..a568f3b 100644 --- a/app/pages/views.py +++ b/app/pages/views.py @@ -8,6 +8,6 @@ from pages.models import Page def page(request,slug): obj = get_object_or_404(Page, slug__exact=slug) context = { 'object': obj,} - return render_to_response('details/page.html', context, context_instance = RequestContext(request)) + return render_to_response(["details/%s.html" % obj.slug, 'details/page.html'], context, context_instance = RequestContext(request)) |