Created
September 7, 2012 15:46
-
-
Save robrocker7/3667317 to your computer and use it in GitHub Desktop.
Example of simple_dtt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def simple_dtt(request, template, extra_context): | |
expire_time = timedelta(days=90) | |
if 'pages' in extra_context: | |
pages = extra_context['pages'] | |
pages.append(extra_context['page_name']) | |
else: | |
pages = get_active(urls.urlpatterns, extra_context['page_name']) | |
forms = {} | |
forms['basic'] = LeadForm() | |
extra_context['forms'] = forms | |
extra_context['active_pages'] = pages | |
response = render_to_response(template, | |
extra_context, | |
context_instance=RequestContext(request)) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment