Ticket #2581: flatpages-populate_xheaders.diff

File flatpages-populate_xheaders.diff, 770 bytes (added by dummy@…, 18 years ago)
  • django/contrib/flatpages/views.py

     
    22from django.template import loader, RequestContext
    33from django.shortcuts import get_object_or_404
    44from django.http import HttpResponse
     5from django.core.xheaders import populate_xheaders
    56from django.conf import settings
    67
    78DEFAULT_TEMPLATE = 'flatpages/default.html'
     
    3233    c = RequestContext(request, {
    3334        'flatpage': f,
    3435    })
    35     return HttpResponse(t.render(c))
     36    response = HttpResponse(t.render(c))
     37    populate_xheaders(request, response, FlatPage, getattr(f, f._meta.pk.name))
     38    return response
Back to Top