Commit Graph

9 Commits

Author SHA1 Message Date
Luke Plant 26cda43012 Switched to HTML5 doctype in all Django supplied templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-20 17:40:53 +00:00
Jannis Leidel 196ac8f8b3 Fixed #6213 -- Updated the flatpages app to only append a slash if the 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
2011-04-20 14:41:47 +00:00
Ian Kelly f17fc56602 Fixed a bunch more tests that were failing in Oracle due to false assumptions about the primary keys of objects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09 23:46:28 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
 assertEquals -> assertEqual
 failUnless -> assertTrue

For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Luke Plant 86031bf59d Fixed #14252 - django.contrib.flatpages unit tests assume default value for settings.LOGIN_URL
Thanks to pmclanahan for report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 23:09:56 +00:00
Russell Keith-Magee 72a7167439 Fixed #5192 -- Modified flatpage admin form to allow ~ and . characters in flatpage names. Thanks to marco.giusti@gmail.com for the report, Idan Gazit for summarizing the issue on the ticket, and ctrochalakis for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-28 12:25:54 +00:00
Russell Keith-Magee e1e2726957 Fixed #6932 -- Added a template tag that gives a list of available flatpages for a given user. Thanks to Dmitri Fedortchenko for the suggestion, and to Mnewman, faldridge and Simon Meers for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-28 11:59:14 +00:00
Russell Keith-Magee 34740625ff Removed a stray DEBUG=True test setting introduced in r13641.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-28 06:12:54 +00:00
Russell Keith-Magee 3f96a7a358 Fixed #14156 -- Modified the way CSRF protection is applied to flatpages so 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-08-27 13:55:11 +00:00