Skip to content

Commit 3460943

Browse files
Fixed django#2581 -- Added populate_xheaders() call to flatpage view. Thanks for the patch, [email protected]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 3cfc8bb commit 3460943

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

django/contrib/flatpages/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from django.shortcuts import get_object_or_404
44
from django.http import HttpResponse
55
from django.conf import settings
6+
from django.core.xheaders import populate_xheaders
67

78
DEFAULT_TEMPLATE = 'flatpages/default.html'
89

@@ -32,4 +33,6 @@ def flatpage(request, url):
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, f.id)
38+
return response

0 commit comments

Comments
 (0)