@csrf_protect
def render_flatpage(request, f):
 if (f.registration_required and (not request.user.is_authenticated())):
  from django.contrib.auth.views import redirect_to_login
  return redirect_to_login(request.path)
 if f.template_name:
  t = loader.select_template((f.template_name, DEFAULT_TEMPLATE))
 else:
  t = loader.get_template(DEFAULT_TEMPLATE)
 f.title = mark_safe(f.title)
 f.content = mark_safe(f.content)
 c = RequestContext(request, {'flatpage': f})
 response = HttpResponse(t.render(c))
 populate_xheaders(request, response, FlatPage, f.id)
 return response

@ csrf_protect def render_flatpage ( request , f ) : if ( f . registration_required and ( not request . user . is_authenticated ( ) ) ) : from django . contrib . auth . views import redirect_to_login return redirect_to_login ( request . path ) if f . template_name : t = loader . select_template ( ( f . template_name , DEFAULT_TEMPLATE ) ) else : t = loader . get_template ( DEFAULT_TEMPLATE ) f . title = mark_safe ( f . title ) f . content = mark_safe ( f . content ) c = RequestContext ( request , { 'flatpage' : f } ) response = HttpResponse ( t . render ( c ) ) populate_xheaders ( request , response , FlatPage , f . id ) return response
internal interface to the flat page view .