Ticket #2581: flatpages-populate_xheaders.diff
File flatpages-populate_xheaders.diff, 770 bytes (added by , 18 years ago) |
---|
-
django/contrib/flatpages/views.py
2 2 from django.template import loader, RequestContext 3 3 from django.shortcuts import get_object_or_404 4 4 from django.http import HttpResponse 5 from django.core.xheaders import populate_xheaders 5 6 from django.conf import settings 6 7 7 8 DEFAULT_TEMPLATE = 'flatpages/default.html' … … 32 33 c = RequestContext(request, { 33 34 'flatpage': f, 34 35 }) 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