The view is located in:
django.contrib.flatpages.views
This is the problematic flatpage view:
{{{
def flatpage(request, url):
if not url.startswith('/'):
url = '/' + url
site_id = get_current_site(request).id
try:
f = get_object_or_404(FlatPage, url=url, sites=site_id)
except Http404:
if not url.endswith('/') and settings.APPEND_SLASH:
url += '/'
f = get_object_or_404(FlatPage, url=url, sites=site_id)
return HttpResponsePermanentRedirect('%s/' % request.path)
else:
raise
return render_flatpage(request, f)
}}}
I think it doesn't make sense to manipulate the url at this point because
nothing happens with the url between manipulating an fetching the FlatPage
from db.
--
Ticket URL: <https://code.djangoproject.com/ticket/32837>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "Screenshot_20210611_063559.png" added.
* status: new => closed
* resolution: => invalid
* component: Uncategorized => contrib.flatpages
Comment:
Thanks for this ticket, however I'm not sure what you're proposing or what
kind of issue you want to report. Also URL should have a leading slash:
[[Image(Screenshot_20210611_063559.png)]]
--
Ticket URL: <https://code.djangoproject.com/ticket/32837#comment:1>