From 54a62999c03f5293b42d56f9a99b1c5a3b02fa5f Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Thu, 21 May 2009 19:47:19 +0100 Subject: [svn] Updates to allow subcave tree with nice admin. --- feincms/shortcuts.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 feincms/shortcuts.py (limited to 'feincms/shortcuts.py') 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)) + -- cgit v1.2.3