summaryrefslogtreecommitdiff
path: root/django/contrib/flatpages/views.py
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2019-04-24Removed unnecessary assignments in various code.Jon Dufresne
2016-04-09Fixed #25847 -- Made User.is_(anonymous|authenticated) properties.Jeremy Lainé
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2015-01-12Deprecated passing a Context to a generic Template.render.Aymeric Augustin
A deprecation path is required because the return type of django.template.loader.get_template changed during the multiple template engines refactor. test_csrf_token_in_404 was incorrect: it tested the case when the hardcoded template was rendered, and that template doesn't depend on the CSRF token. This commit makes it test the case when a custom template is rendered.
2014-01-26Moved RequestSite and get_current_site.Aymeric Augustin
Following the app-loading refactor, these objects must live outside of django.contrib.sites.models because they must be available without importing the django.contrib.sites.models module when django.contrib.sites isn't installed. Refs #21680. Thanks Carl and Loic for reporting this issue.
2014-01-17Removed some unnecessary __exact operators in filters.Tim Graham
2013-10-31Started attackign the next flake8 violationAlex Gaynor
2013-05-18Fixed #13285: populate_xheaders breaks cachingŁukasz Langa
2012-10-01Prevented flatpage view from directly accessing settings.SITE_IDClaude Paroz
Refs #15089
2012-06-26Add reST role to templates named in some view docs.Ben Spaulding
This makes the templates link up correctly in the admindocs.
2011-04-20Fixed #6213 -- Updated the flatpages app to only append a slash if the ↵Jannis Leidel
flatpage actually exist. The FlatpageFallbackMiddleware (and the view) now only add a trailing slash and redirect if the resulting URL refers to an existing flatpage. Previously requesting /notaflatpageoravalidurl would redirect to /notaflatpageoravalidurl/, which would then raise a 404. Requesting /notaflatpageoravalidurl now will immediately raise a 404. Also, Redirects returned by flatpages are now permanent (301 status code) to match the behaviour of the CommonMiddleware. Thanks to Steve Losh for the initial work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16048 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-27Fixed #14156 -- Modified the way CSRF protection is applied to flatpages so ↵Russell Keith-Magee
that the flatpage middleware doesn't cause all POSTs resulting in 404s to turn into 403s. Thanks to patrys for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-04Fixed #12358 - csrf_token template tag does not work with flatpages.Luke Plant
Thanks to phretor for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21Fixed #8376 -- Use request.path and request.path_info at the right moments whenMalcolm Tredinnick
serving data in the flatpage middleware. Patch from jcassee. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05Fixed #6213: flatpage view now correctly redirects if settings.APPEND_SLASH. ↵Jacob Kaplan-Moss
Thanks, crankycoder. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14Implemented auto-escaping of variable output in templates. Fully ↵Malcolm Tredinnick
controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359 See documentation in templates.txt and templates_python.txt for how everything works. Backwards incompatible if you're inserting raw HTML output via template variables. Based on an original design from Simon Willison and with debugging help from Michael Radziej. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-23Fixed #2581 -- Added populate_xheaders() call to flatpage view. Thanks for ↵Adrian Holovaty
the patch, dummy@habmalnefrage.de git-svn-id: http://code.djangoproject.com/svn/django/trunk@3650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19Fixed #2332 -- Introduced is_authenticated() method on User and ↵Malcolm Tredinnick
AnonymousUser classes. Recommended its use over is_anonymous in the docs. Changed internal Django use to match this recommendation. Thanks to SmileyChris and Gary Wilson for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-11BACKWARDS-INCOMPATIBLE CHANGE -- Moved flatpages and redirects to standalone ↵Adrian Holovaty
apps in django.contrib that are NOT installed by default. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for full migration information. git-svn-id: http://code.djangoproject.com/svn/django/trunk@1166 bcc190cf-cafb-0310-a4f2-bffc1f526a37