Ticket #7257: flatpages.patch
File flatpages.patch, 955 bytes (added by , 16 years ago) |
---|
-
django/contrib/flatpages/views.py
1 1 from django.contrib.flatpages.models import FlatPage 2 2 from django.template import loader, RequestContext 3 3 from django.shortcuts import get_object_or_404 4 from django.http import HttpResponse 4 from django.http import HttpResponse, HttpResponseRedirect 5 5 from django.conf import settings 6 6 from django.core.xheaders import populate_xheaders 7 7 from django.utils.safestring import mark_safe … … 19 19 flatpage 20 20 `flatpages.flatpages` object 21 21 """ 22 if not url.endswith('/') and settings.APPEND_SLASH: 23 return HttpResponseRedirect(url + "/") 22 24 if not url.startswith('/'): 23 25 url = "/" + url 24 26 f = get_object_or_404(FlatPage, url__exact=url, sites__id__exact=settings.SITE_ID)