def page(request, slug): context = {} page_obj = get_object_or_404(Page, slug=slug) nav = navs(request) context['page'] = page_obj # the processors are on crack :-\ context['navs'] = nav return render(request, 'static_page.html', context, )
def page(request,slug): context = RequestContext(request) page = get_object_or_404(Page,slug=slug) nav = navs(request) context['page'] = page #the processors are on crack :-\ context['navs'] = nav return render_to_response('static_page.html', context,) #context_instance=context)
def page(request, slug): context = {} page_obj = get_object_or_404(Page, slug=slug) nav = navs(request) context['page'] = page_obj # the processors are on crack :-\ context['navs'] = nav return render( request, 'static_page.html', context, )
def page(request, slug): """ Generate custom page """ context = {} page_obj = get_object_or_404(Page, slug=slug) nav = navs(request) context['page'] = page_obj context['title'] = page_obj.title context['description'] = page_obj.description context['styles'] = page_obj.css context['noindex'] = page_obj.noindex # the processors are on crack :-\ context['navs'] = nav return render(request, 'static_page.html', context, )