summaryrefslogtreecommitdiffstats
path: root/feincms/shortcuts.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-21 19:47:19 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-21 19:47:19 +0100
commit891b3abb44f1a4a855510be70b2048ed955bbe17 (patch)
tree51d2636ed80d9120cd3be541e2b7f01592f42694 /feincms/shortcuts.py
parent01b0980c441a7a2a9e47680ee0b025e648c9ef0f (diff)
downloadtroggle-891b3abb44f1a4a855510be70b2048ed955bbe17.tar.gz
troggle-891b3abb44f1a4a855510be70b2048ed955bbe17.tar.bz2
troggle-891b3abb44f1a4a855510be70b2048ed955bbe17.zip
[svn] Updates to allow subcave tree with nice admin.
Diffstat (limited to 'feincms/shortcuts.py')
-rw-r--r--feincms/shortcuts.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/feincms/shortcuts.py b/feincms/shortcuts.py
new file mode 100644
index 0000000..a0e4e19
--- /dev/null
+++ b/feincms/shortcuts.py
@@ -0,0 +1,13 @@
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+
+from feincms.module.page.models import Page
+
+
+def render_to_response_best_match(request, template_name, dictionary=None):
+ dictionary = dictionary or {}
+ dictionary['feincms_page'] = Page.objects.best_match_for_request(request)
+
+ return render_to_response(template_name, dictionary,
+ context_instance=RequestContext(request))
+