Commit Graph

1840 Commits

Author SHA1 Message Date
Luke Plant 243d0bec19 Fixed #15617 - CSRF referer checking too strict
Thanks to adam for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 20:37:09 +00:00
Russell Keith-Magee 6eb1c58430 Added file mistakenly ommitted from r15819
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 09:30:01 +00:00
Russell Keith-Magee 87a100b642 Fixed #15575 -- Corrected handling of pagination in generic views to match documentation and historical behavior. Thanks to Ivan Virabyan for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 08:24:31 +00:00
Russell Keith-Magee c966566171 Fixed #14960 -- Added tests for inclusion tags. Thanks to Julien Phalip for the report, and to avenet and Paul Bissex for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 08:20:14 +00:00
Russell Keith-Magee 350a56ad49 Fixed #15606 -- Ensured that boolean fields always use the Boolean filterspec. Thanks to Martin Tiršel for the report
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 08:19:39 +00:00
Adrian Holovaty 4e25bc71b1 Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 23:00:03 +00:00
Adrian Holovaty 72c5733869 Fixed #15604 -- Changed django.db.models.permalink to use wraps() so that it doesn't eat the docstring. Thanks for the report, sfllaw. Also added tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 05:22:39 +00:00
Luke Plant e9d2763947 Fixed #15572 - include with "only" option discards context properties (such as autoescape)
Thanks to dfoerster for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-10 18:42:24 +00:00
Luke Plant 0a3aae8362 Fixed #15559 - distinct queries introduced by [15607] cause errors with some custom model fields
This patch just reverts [15607] until a more satisfying solution can be
found.

Refs #11707

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-10 01:15:19 +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
Ian Kelly 0cf527f77c Fixed a test that was failing in Oracle due to default ordering assumptions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09 19:20:35 +00:00
Ian Kelly 9e637d3061 Fixed a number of 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@15779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09 00:39:35 +00:00
Ian Kelly 8b22f7cf78 Fixed field names that were preventing the tests from running in Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08 19:26:32 +00:00
Russell Keith-Magee c260c533e1 Fixed #15570 -- Corrected a flaw in the design of the silent flag on {% cycle %}. Thanks to Brian Neal for the report, and to Andrew and Jannis for the design consult.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08 13:43:53 +00:00
Russell Keith-Magee 4b746a6a24 Fixed #15549 -- Removed dependency on specific primary keys. Thanks to bberes for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 00:23:00 +00:00
Russell Keith-Magee 185b4f49ca Fixed #15548 -- Added an ordering clause to prevent test failures under Postgres. Thanks to bberes for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 00:01:56 +00:00
Russell Keith-Magee 806bffcf08 Fixed #15544 -- Corrected a test failure in the generic views tests that depended on primary key allocation. Thanks to Łukasz Rekucki for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 23:54:12 +00:00
Russell Keith-Magee d05bb1384a Fixed #15545 -- Corrected the admin filterspecs tests to be non-dependent on PK allocation or model ordering. Thanks to Łukasz Rekucki for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 23:49:44 +00:00
Ramiro Morales 3ecf628b36 Fixed #11206 -- Ensure that the floatformat template filter doesn't switch to scientific notation when asked to format a zero value with more than six decimal places. Thanks Tai Lee for the report and fix and Facundo Batista for his help when Decimal module expertise was needed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 20:56:46 +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
Russell Keith-Magee b7c41c1fbb Fixed #12252 -- Ensure that queryset unions are commutative. Thanks to benreynwar for the report, and draft patch, and to Karen and Ramiro for the review eyeballs and patch updates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:51:54 +00:00
Russell Keith-Magee d1290b5b43 Fixed #3094 -- Accelerated deprecation of XMLField, since it hasn't served any useful purpose since oldforms. Thanks to PaulM for driving the issue and providing the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:28:20 +00:00
Jannis Leidel b921f1bac0 Fixed #12475 -- Fixed an edge case with hidden fields in ModelAdmin changelists when used in conjunction with list_display_links or list_editable. Thanks, Simon Meers, Julien Phalip, Karen and master.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:20:45 +00:00
Jannis Leidel c0fb9bd00b Fixed #13411 -- Made sure URL fragments are correctly handled by the next_redirect utility of the comments apps. Thanks, timesong, dpn and Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:03:53 +00:00
Russell Keith-Magee edfed18581 Fixed #15502 -- Ensure that nested TemplateDoesNotExist errors are propegated with a meaningful error message when loaded using select_template. Thanks to jaylett for the report, and GDorn for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 00:41:40 +00:00
Jannis Leidel 93cd8442fc Fixed #15535 -- Stopped the blocktrans template tag from raising a KeyError if an included variable can't be found in the context. Thanks, melinath.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02 21:36:41 +00:00
Jannis Leidel f6c991667f Fixed #4992 -- Respect the GET request query string when creating cache keys. Thanks PeterKz and guettli for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02 12:47:36 +00:00
Jannis Leidel 6b95aa6fb5 Fixed #15531 -- Partially reverted [15701] due to compatibility issues with middlewares that modify content of responses. Thanks for the report, schinckel. Refs #15281.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02 10:40:48 +00:00
Jannis Leidel be4a2e3f3e Fixed #15281 -- Made the static view use an iterator when serving a file, effectively making this less of a memory hog. Also use the appropriate attributes of the stat object instead of indexes. Thanks for the initial patch, FunkyBob and aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 22:49:10 +00:00
Luke Plant 8f19878263 Added file missing from [15696], sorry for breakage.
Thanks to Ramiro for letting me know. Refs #717.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 18:25:35 +00:00
Luke Plant dbe6ced0d6 Fixed #717 - If-Modified-Since handling should compare dates according to RFC 2616
Thanks to Maniac for the report, julienb for the initial patch, and
especially to aaugustin for the final patch and tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 14:28:06 +00:00
Ramiro Morales bd3b5e8c2b Fixed #15517 -- Fixed regression in admin search_fields option introduced in r15526. Thanks Fabian Buechler for the report and fix and Julien Phalip for adding tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 02:04:35 +00:00
Ramiro Morales 70d3c84d18 Fixed #13433 -- Changed default behavior of Django email message wrappers to not mangle lines starting with 'From '. Thanks Leo for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-28 02:42:28 +00:00
Luke Plant 2366415f48 Fixed #15368 - test failures due to regression with RequestContext
Thanks to cyberdelia for the reports on this.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-27 00:24:35 +00:00
Russell Keith-Magee b5b5ba6cd9 Fixed #10918 -- Ensure that the search widget on a raw_id_admin uses the right field name when the ForeignKey has a to_field definition. Thanks to David Cramer for the report, Collin Anderson for the fix, and Julien Phalip for the test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 12:44:25 +00:00
Russell Keith-Magee 0b53d318ef Fixed #11447 -- Ensured that ForeignKey widgets in a list-editable admin changelist won't wrap split the widget. Thanks to patrick@vonautomatisch.at for the report, and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 12:43:57 +00:00
Ramiro Morales 0a9b5d7ade Fixed #15424 -- Corrected lookup of callables listed in admin inlines' `readonly_fields` by passing the right ModelAdmin (sub)class instance when instantiating inline forms admin wrappers. Also, added early validation of its elements. Thanks kmike for the report and Karen for the patch fixing the issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 01:44:41 +00:00
Russell Keith-Magee 4d70d48ecb Fixed #8528 -- Ensure that null values are displayed as a filtering option in the admin if a field allows nulls. Thanks to StevenPotter for the report, and oyvind, marcob, Simon Meers and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-25 15:14:26 +00:00
Jacob Kaplan-Moss 174d8db57c Prevented non-admin users from accessing the admin redirect shortcut.
If the admin shortcut view (e.g. /admin/r/<content-type>/<pk>/) is
publically-accessible, and if a public users can guess a content-type ID
(which isn't hard given that they're sequential), then the redirect view could
possibly leak data by redirecting to pages a user shouldn't "know about." So
the redirect view needs the same protection as the rest of the admin site.

Thanks to Jason Royes for pointing this out.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-24 13:34:51 +00:00
Ramiro Morales 4b13e76deb Fixed #14012 (again) -- Admin app: Don't show the full user edition view after adding a user in a FK popup. Thanks dburke for reporting this regression introduced in r14628.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-24 01:00:57 +00:00
Russell Keith-Magee 12bd7bcb35 Fixed #12004 -- Improved error reporting when an abstract class is registered with the admin. Thanks to Matt Smalley for the report, and to mk and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-23 13:43:21 +00:00
Ramiro Morales 337d102b86 Fixed #13510 -- Corrected colspan of non-field-specific error messages in admin app tabular inlines so it isn't greater than the actual number of field cells. Thanks KyleMac for the report and Julien Phalip for the patch fixing the issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-22 03:07:57 +00:00
Luke Plant fdf9602961 Fixed #11058 - list_display_links doesn't allow callables not defined in the model
Thanks to dvine for the report and julien for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 19:15:02 +00:00
Luke Plant c411377bd5 Fixed #15349 - Bound FormSet produces bound empty_form
Thanks to hidde-jan for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 15:43:42 +00:00
Luke Plant 13f9fd38dc Fixed #14099 - BaseModelFormSet should use _should_delete_form
Thanks to kenth for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 14:23:02 +00:00
Luke Plant 6902824ac2 Fixed #11707 - limit_choices_to on a ForeignKey can render duplicate options in formfield
Thanks to Chris Wesseling for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 14:03:59 +00:00
Russell Keith-Magee b151bccdcc Fixed #15359 -- Ensure that the -h option is always honored by django-admin.py. Thanks to teubank for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 13:45:57 +00:00
Karen Tracey f21fc714ea Fixed #15362: Added explicit deletion of file to test, needed now since files are no longer auto-deleted when a referencing object is deleted. Thanks mila.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 12:35:19 +00:00
Ramiro Morales 52fc61e0cf Fixed #14529 -- Fixed representation of model names in admin messages after model object changes when the ModelAdmin queryset() uses defer() or only(). Thanks rlaager for report and initial patch, to rasca an julien for help in tracking the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20 23:09:25 +00:00
Chris Beaven 1073a83f2c Ensure render_to_string leaves the context instance stack in the state it was originally passed in.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20 04:55:11 +00:00