Russell Keith-Magee
bb4062d53b
Fixed #12237 -- Improved the error message for m2m fields with an explicit through model being listed in admin fieldsets. Thanks to Pyth for the report and Ramiro Morales for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-18 07:44:06 +00:00
Brian Rosner
6c61ca3d74
Fixed #5034 -- honor request.urlconf in reverse and resolve.
...
This enables {% url %} to honor request.urlconf set from process_request
middleware methods.
Thanks SmileyChris for the initial patch work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-16 01:58:00 +00:00
Russell Keith-Magee
0aeb1e135d
Refs #12203 -- Improved error handling for the case where a user manually specifies an m2m field with an explicit through field. Thanks to dgouldin for the report, and Ramiro Morales for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-13 12:35:05 +00:00
Russell Keith-Magee
dd045aaab5
Fixed #12209 -- Made the through attribute on a m2m relation into a property to ensure that the fully resolved through model is always provdided. Thanks to dgouldin for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-13 12:34:41 +00:00
Russell Keith-Magee
632f12fba4
Fixed #12163 -- Corrected the unpickling of non-deferred models. Thanks to rfugger for the report and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-11 13:06:18 +00:00
Russell Keith-Magee
70f9a4f6ce
Fixed #12190 -- Corrected a regression in the ability to instantiate ForeignKeys outside of models. Thanks to jittat for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 15:21:12 +00:00
Russell Keith-Magee
dd5d7622a5
Fixed #11144 -- When a to/from/cc header contains unicode, make sure the email addresses are parsed correctly (especially with regards to commas). Thanks to rmt for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-04 11:24:56 +00:00
Russell Keith-Magee
585b7acaa3
Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by introducing an autogenerated through model.
...
This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 14:02:49 +00:00
Russell Keith-Magee
aba5389326
Fixed #10355 -- Added an API for pluggable e-mail backends.
...
Thanks to Andi Albrecht for his work on this patch, and to everyone else that contributed during design and development.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 12:53:26 +00:00
Russell Keith-Magee
5dfed1b24a
Fixed #12127 -- Corrected teardown of dateformat tests. Thanks to apollo13 for the report, and Karen Tracey for the debugging help.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-02 08:26:03 +00:00
Karen Tracey
1ea08b441d
Repeat the setUp/tearDown changes made in r11699 for the tests
...
converted in r11694. This allows the dateformat tests to pass
on Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01 23:48:31 +00:00
Karen Tracey
d4bb582b1a
Changed setUp and tearDown for the tests converted from doctests in r11695
...
to not assume TZ absolutely will be set in the environment. That environment
variable does not necessarily exist on Windows, it seems.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01 23:09:23 +00:00
Karen Tracey
ff38e0b1d1
Fixed #12125 -- Fixed a typo in the generic views date_based test that caused it to fail in November. Thanks brutasse.
...
--This line and those below, will be ignored--
M tests/regressiontests/views/tests/generic/date_based.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01 22:12:40 +00:00
Russell Keith-Magee
e18af06eed
Fixed #12123 -- Updated the utils.dateformat test to be a unittest too, due to a dependency on the old dateformat test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01 04:53:51 +00:00
Russell Keith-Magee
acfa9332de
Fixed #12123 -- Refactored dateformat tests to use unittest. This is needed so that we have a reliable teardown that can reset the timezone at the end of the test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01 04:20:17 +00:00
Brian Rosner
8dd4a28721
Fixed #11872 -- Instantiate the correct model in BaseInlineFormSet.__init__ when instance is None. Thanks tobias.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-30 09:11:56 +00:00
Russell Keith-Magee
96658ef2d2
Fixed #12057 -- Corrected regression of caching performance when a model contained a callable default. Thanks to Michael Thornhill for the excellent assistance tracking this problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-29 14:32:01 +00:00
Jacob Kaplan-Moss
4281bf3db0
Fixed #11057 : having no actions in the admin (`actions=None`) no longer messes up the layout. Thanks, rvdrijst.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 20:56:12 +00:00
Luke Plant
7230a995ce
Moved contrib.csrf.* to core code.
...
There is stub code for backwards compatiblity with Django 1.1 imports.
The documentation has been updated, but has been left in
docs/contrib/csrf.txt for now, in order to avoid dead links to
documentation on the website.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 00:36:34 +00:00
Luke Plant
8e70cef9b6
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
...
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-26 23:23:07 +00:00
Jacob Kaplan-Moss
d1da261417
Fixed #11371 : Made `django.test.Client.put()` work for non-form-data PUT (i.e. JSON, etc.). Thanks, phyfus.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-26 15:02:54 +00:00
Jacob Kaplan-Moss
9f70783b14
Fixed a couple of test-ordering-dependant failures introduced in [11639] that caused test failures when running the whole test suite.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-24 00:23:47 +00:00
Jacob Kaplan-Moss
8be1bb2268
Fixed #11625 : added comment moderation via admin actions.
...
This is BACKWARDS INCOMPATIBLE if you were using the completely undocumented moderation view from 1.1. That view's been removed in favor of the admin actions.
Thanks, Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-23 19:22:31 +00:00
Luke Plant
162fade2b7
Fixed #12060 - equality tests between User and SimpleLazyObject-wrapped User failed.
...
Also added more tests for SimpleLazyObject
Thanks to ericholscher for report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-20 14:11:08 +00:00
Luke Plant
22be3d7612
Fixed #12049 - LazyObject-wrapped User breaks queries in template tags
...
Thanks to chipx86 for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-19 21:13:22 +00:00
Brian Rosner
cb7a3262b5
Moved the call to _get_foreign_key to run in all cases catching incorrect inline setup sooner.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-19 19:17:20 +00:00
Brian Rosner
5fc35c9caf
Fixed #11709 — Pass inline fk_name attribute when grabbing foreign key to test for exclusion. Thanks yishaibeeri for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-19 19:17:07 +00:00
Luke Plant
a2d8acbacd
Fixed a regression on Python 2.6 caused by r11623
...
This might fix #12037 , but I cannot reproduce that bug.
Refs #12037
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-15 14:12:34 +00:00
Luke Plant
c161bf21f0
Fixed #6552 , #12031 - Make django.core.context_processors.auth lazy to avoid "Vary: Cookie"
...
Thanks to olau@iola.dk , Suor for the report
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-14 18:09:13 +00:00
Jacob Kaplan-Moss
9f8287a3f1
SECURITY ALERT: Corrected regular expressions for URL and email fields.
...
Certain email addresses/URLs could trigger a catastrophic backtracking situation, causing 100% CPU and server overload. If deliberately triggered, this could be the basis of a denial-of-service attack.
This security vulnerability was disclosed in public, so we're skipping our
normal security release process to get the fix out as soon as possible.
This is a security related update. A full announcement, as well as backports for the 1.1.X and 1.0.X series will follow.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-09 20:57:59 +00:00
Luke Plant
6e3a72585a
Added 'key_prefix' keyword argument to cache_page()
...
This was available before r11586, but undocumented. It has now been
re-added with documentation and explicit support, as it seems like a useful
feature and people were using it before.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-28 21:54:54 +00:00
Luke Plant
a97648a7e0
Corrected regressions introduced in r11586 and r11593
...
I read the order of arguments in the docs incorrectly, doh!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-26 19:39:42 +00:00
Luke Plant
afeafcd492
Fixed #6371 - several decorators don't work with bound methods.
...
This involved changing the way the internal function
decorator_from_middleware works slightly, breaking some code that relied on
the old behaviour. As a result, it is much simpler, but cache_page has been
made slightly more complex to cope with the change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-21 22:31:51 +00:00
Russell Keith-Magee
0757607217
Fixed #11820 -- Corrected the spelling of Grace Hopper's name in a test. Thanks to shields@msrl.com for the report, and apologies to Admiral Hopper for the error.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-13 04:32:55 +00:00
Luke Plant
7c53c2618d
Fixed #10968 - Form.errors should use Form.error_class.
...
Thanks for report and initial patch, matehat.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 10:47:40 +00:00
Luke Plant
84ef9dabfa
Fixed #11061 : Malformed POST request causes TypeError in AdminSite.login().
...
Thanks vvd
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 16:50:57 +00:00
Luke Plant
a2b46ca5fd
Fixed #11833 : name conflict in filter test.
...
Thanks steveire
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 16:35:23 +00:00
Ian Kelly
dcf3be7a62
Fixed #10566 : Added support for cx_Oracle compiled with the WITH_UNICODE flag.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-24 15:45:48 +00:00
Matt Boersma
e263cc0dc5
Fixed #11049 : introspection on Oracle now identifies IntegerFields correctly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-21 21:42:39 +00:00
Matt Boersma
e0ce9d76e1
Fixed an assumed ordering in the queries regression tests by making it explicit.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-20 16:05:25 +00:00
Russell Keith-Magee
8bee4604a1
SECURITY ALERT: Corrected a problem with the Admin media handler that could lead to the exposure of system files. Thanks to Gary Wilson for the patch.
...
This is a security-related update. A full announcement, as well as backports for 1.0.X and 0.96.X will be forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-29 02:40:14 +00:00
Russell Keith-Magee
3412860f89
Fixed #11428 -- Ensured that SQL generating commands and dumpdata don't include proxy models in their output. Thanks to Anssi Kaariainen for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-27 14:32:30 +00:00
Russell Keith-Magee
4a01812c15
Fixed #11546 -- Modified the mail regression test to avoid getting hung up on 32/64 bit differences. Thanks to Richard Davies for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-25 05:14:46 +00:00
Russell Keith-Magee
53d16b1175
Fixed #11532 -- Corrected the link used for edit_inline foreign keys in admin when the admin is deployed using the old style admin.root approach. Thanks to JP for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-23 14:31:33 +00:00
Ian Kelly
bbac0cc965
Fixed #11487 : pass long strings to Oracle as CLOB rather than NCLOB to prevent an encoding bug that occurs in some installations.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-21 21:20:18 +00:00
Russell Keith-Magee
8d48eaa064
Fixed #10061 -- Added namespacing for named URLs - most importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch.
...
This change is backwards incompatible for anyone that is using the named URLs
introduced in [9739]. Any usage of the old admin_XXX names need to be modified
to use the new namespaced format; in many cases this will be as simple as a
search & replace for "admin_" -> "admin:". See the docs for more details on
the new URL names, and the namespace resolution strategy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 16:16:13 +00:00
Russell Keith-Magee
e992e57d3e
Fixed #11416 -- Restored use of the never_cache decorator on admin views. Thanks to Ramiro Morales and Michael Newmann for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-13 13:46:31 +00:00
Russell Keith-Magee
52bc782621
Fixed #11107 -- Corrected the generation of sequence reset SQL for m2m fields with an intermediate model. Thanks to J Clifford Dyer for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-11 14:22:52 +00:00
Russell Keith-Magee
7ecb8b08b3
Fixed #10922 -- Corrected handling of POST data to ensure that the right objects are updated on save when the ordering field is editable. Thanks to Alex Gaynor, Karen Tracy, and Will Hardy for their contributions to this patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-03 03:05:17 +00:00
Russell Keith-Magee
735309341e
Fixed #10834 -- Added bucket condition to ensure that URL resolvers won't ever return None. Thanks to Chris Cahoon for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 14:02:17 +00:00
Russell Keith-Magee
e522e61a80
Fixed #11392 -- Enforced a predictable result order for a couple of test cases. Thanks to Nathan Auch for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 12:29:48 +00:00
Russell Keith-Magee
cbbe60c7fc
Fixed #11270 -- Modified cache template tag to prevent the creation of very long cache keys. Thanks to 235 for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 15:04:00 +00:00
Russell Keith-Magee
8950a40cec
Fixed #11270 -- Corrected naming conflict in templatetag test. Thanks to steveire for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 15:03:17 +00:00
Russell Keith-Magee
191203b48d
Fixed #9023 -- Corrected a problem where cached attribute values would cause a delete to cascade to a related object even when the relationship had been set to None. Thanks to TheShark for the report and test case, and to juriejan and Jacob for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-15 14:30:51 +00:00
Russell Keith-Magee
b38cf5db5c
Fixed #11311 -- Reverted [10952], Refs #10785 . Changeset [10952] caused problems with m2m relations between models that had non-integer primary keys. Thanks to Ronny for the report and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-15 11:47:01 +00:00
Luke Plant
9294121d3c
Fixed #9367 - EmailMultiAlternatives does not properly handle attachments.
...
Thanks to Loek Engels for the bulk of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-12 13:56:40 +00:00
Russell Keith-Magee
d3bd3203f9
Fixed #11286 -- Ensured that dumpdata uses the default manager, rather than always using the manager called `objects`. Thanks to Marc Remolt for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-09 13:14:40 +00:00
Brian Rosner
89df572c47
Fixed #11274 -- Corrected doctests to not cause test failures due to missing newlines. Thanks Honza Kral.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-07 18:07:53 +00:00
Russell Keith-Magee
151d88af4e
Fixed #11082 -- Ensured that subqueries used in an exclude(X__in=) clause aren't pre-evaluated. Thanks to Henry Andrews for the report, and clement for the fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 13:35:33 +00:00
Russell Keith-Magee
fa43a32bcb
Fixed #10733 -- Added a regression test for queries with multiple references to multiple foreign keys in only() clauses. Thanks to mrts for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 12:16:06 +00:00
Russell Keith-Magee
2416e5fefe
Fixed #9479 -- Corrected an edge case in bulk queryset deletion that could cause an infinite loop when using MySQL InnoDB.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-03 13:23:19 +00:00
Gary Wilson Jr
419747d1c8
Fixed a few Python 2.3 incompatibilities that were causing test failures.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29 05:23:50 +00:00
Gary Wilson Jr
c78554b216
Added test for pickling of a model with an `ImageField`, refs #11103 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29 04:06:09 +00:00
Gary Wilson Jr
d89ba464dd
Changes to `ImageFileDescriptor` and `ImageField` to fix a few cases of setting image dimension fields.
...
* Moved dimension field update logic out of `ImageFileDescriptor.__set__` and into its own method on `ImageField`.
* New `ImageField.update_dimension_fields` method is attached to model instance's `post_init` signal so that:
* Dimension fields are set when defined before the ImageField.
* Dimension fields are set when the field is assigned in the model constructor (fixes #11196 ), but only if the dimension fields don't already have values, so we avoid updating the dimensions every time an object is loaded from the database (fixes #11084 ).
* Clear dimension fields when the ImageField is set to None, which also causes dimension fields to be cleared when `ImageFieldFile.delete()` is used.
* Added many more tests for ImageField that test edge cases we weren't testing before, and moved the ImageField tests out of `file_storage` and into their own module within `model_fields`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-28 05:46:09 +00:00
Russell Keith-Magee
4567b44909
Modified a test from r10787 so that the comparison order is reliable. Thanks to Alex Gaynor and Tom Tobin for the report via IRC.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 00:19:13 +00:00
Karen Tracey
8c8625bde3
Fixed #11149 -- Don't call save_form_data on file-type fields multiple times when saving a model form.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-19 23:13:33 +00:00
Karen Tracey
50745cc31e
Fixed #11066 -- Corrected 15 duplicate "the"s found in docs and code comments. Thanks kaikuehne.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-17 16:45:28 +00:00
Matt Boersma
56f3ed7f54
Fixed import statement in admin_views test to work with Python 2.3.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 15:01:40 +00:00
Russell Keith-Magee
a00be66311
Fixed #11120 -- Corrected handling of inlines attached to inherited classes, broken by r10756. Thanks to George Song and Michael Strickland for the simultaneous reports.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 12:44:51 +00:00
James Bennett
bcb0d124b4
Corrected tests from [10784]; instead of retrieving two comments, it was retrieving one comment twice.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 02:54:55 +00:00
Jacob Kaplan-Moss
d246401552
Fixed #11113 : fixed a couple of issues that slipped through the cracks when comment moderation was added to `django.contrib.comments`.
...
The is a potentially backwards-incompatible change for users already relying on the internals of comment moderaration. To wit:
* The moderation system now listens to the new `comment_will_be_posted`/`comment_was_posted` signals instead of `pre/post_save`. This means that import request-based information is available to moderation as it should be.
* Some experimental code from `django.contrib.comments.moderation` has been removed. It was never intended to be merged into Django, and was completely untested and likely buggy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 15:20:50 +00:00
Jacob Kaplan-Moss
3da3716252
Fixed #10348 : ChangeList no longer overwrites a select_related provided by `ModelAdmin.queryset()`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 15:09:33 +00:00
Jacob Kaplan-Moss
e508bfd27f
Fixed #10992 : fixed a bug saving inlines with custom primary key fields. Thanks, Zain.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 02:23:53 +00:00
Russell Keith-Magee
7215ffe8a4
Fixed #10243 , #11043 -- Corrected handling of formsets over a ForeignKey that uses to_field, and by extension, fixed the admin for handling fields of that type. Thanks to apollo13 for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-13 14:04:29 +00:00
Jacob Kaplan-Moss
d20a0834ac
Fixed #9751 : admin scripts now calculate the project directory correctly when the settings module is a directory with an ``__init__.py``. Thanks to Eric Holscher.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-12 21:45:03 +00:00
Karen Tracey
14a6f6cf9a
Fixed #11032 : close() a file explictly open()'d in a test, so that deleting the file tree it is in doesn't fail on Windows. Thanks bthomas for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11 16:13:29 +00:00
Jacob Kaplan-Moss
2b0903b2c4
Fixed #10404 : ImageField height_field and width_field options no longer depend on putting the image field after the height/width fields as they did after r9766.
...
This bug actually exposed a related handful of inconsistancies in the underlying file handling and wraping, so a few related changes are in here as well:
* Dimensions are also now calculated the moment the image is assigned to the field instead of upon save.
* The base `File` object now when possible delegates its closed attribute down to the os-level file it wrapps.
* In-memory files' `close()` now is a no-op. Without this certain APIs that should be able to handle in-memory files were failing.
* Accessing `FieldFile.closed` used to open the file. That's silly, and it doesn't any more.
* Some over-eager error handling was squishing some errors that would normally be raised. One unit test was incorrectly depending on this behavior, so the test was removed.
Thanks to Armin Ronacher for much of this work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11 09:57:19 +00:00
Russell Keith-Magee
8c2db4ab0f
Fixed #10906 -- Added a check for PostgreSQL pre 8.2 when using StdDev/Variance aggregates. Thanks to Richard Davies for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 09:22:53 +00:00
Russell Keith-Magee
b97178f7ec
Fixed #10842 -- Corrected parsing of version numbers for PostgreSQL 8.4beta series. Thanks to hgdeoro for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 09:22:06 +00:00
Russell Keith-Magee
5663258de1
Fixed #10792 -- Ensured that ModelChoiceFields don't provide an empty option when the underlying field has blank=False and there is a default value available. Thanks to carljm for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 07:44:27 +00:00
Russell Keith-Magee
2c2871b7c3
Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to jsmullyan for the report, and mir for helpful triage work. Patch includes regression test for #8093 , and a commented out test for #10992 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-09 11:40:13 +00:00
Jacob Kaplan-Moss
c40f715257
Fixed #10687 : fixed request parsing when upload_handlers is empty. Thanks, Armin Ronacher.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 17:22:34 +00:00
Jacob Kaplan-Moss
68a890e79f
Fixed #7712 , #9404 , #10249 , #10300 : a light refactor and cleanup of file storage and the `File` object. Thanks to Armin Ronacher and Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 15:08:09 +00:00
Jacob Kaplan-Moss
2af75b485d
Fixed #10825 : fixed the 'U' format code to dateformat (and the date/now filter/tag). Thanks to gsong and mir.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 13:39:37 +00:00
Jacob Kaplan-Moss
23fa913676
Fixed #10448 : correcting errors on "save as new" now correctly create a new object instead of modifying the old one. Thanks, bastih.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 12:53:14 +00:00
Jacob Kaplan-Moss
155ab07a5d
Fixed #10188 : prevent newlines in HTTP headers. Thanks, bthomas.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 11:15:23 +00:00
Jacob Kaplan-Moss
a7faf6424a
Fixed #8817 : get_image_dimensions correctly closes the files it opens, and leaves open the ones it doesn't. Thanks, mitsuhiko.
...
While I was at it, I converted the file_storage doctests to unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 10:56:51 +00:00
Jacob Kaplan-Moss
614d881450
Fixed #10750 : respect comment=False in inline formsets. Thanks, Koen Biermans.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 09:59:46 +00:00
Gary Wilson Jr
59507753c7
Fixed #9610 -- Fixed duplicate uploaded file name mangling when directory contained a dot and file didn't. Based on patches from fadlytabrani and adurdin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 05:50:31 +00:00
Jacob Kaplan-Moss
7caf21aa2e
Make sure that all uses of max_length in the test suite use values smaller than 255. If we use max_length > 255 the test suite can't be run on MySQL 4.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 18:06:22 +00:00
Jacob Kaplan-Moss
fb9ac5729d
Fixed #10153 : foreign key `gte` and `lte` lookups now work. Thanks, joelhooks and adurdin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 16:12:08 +00:00
Jacob Kaplan-Moss
bfdb7d26aa
Fixed #9659 : fixed `wsgi.file_wrapper` in the builtin server. Thanks, mitsuhiko.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 15:39:06 +00:00
Matt Boersma
523da3801d
Fixed test suite on Oracle that was broken by using keyword "date" as a field name. Refs #4140 and #10422 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 14:48:04 +00:00
Russell Keith-Magee
ae7d9bfad2
Fixed #10899 -- Ensured that log messages for deletions in the admin contain useful descriptions. Thanks to Jeremy Dunck for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 13:10:59 +00:00
Russell Keith-Magee
b5f0aff922
Fixed #10516 -- Corrected admin search when the search_fields definition contains multiple fields on the same base model. Thanks to Zain Memon for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 12:52:43 +00:00
Russell Keith-Magee
eb81d5acb3
Fixed #10893 -- Corrected a problem with using list_editable in the admin when the model has a manual primary key. Thanks to Alex Gaynor for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 11:56:10 +00:00
Russell Keith-Magee
9d28568cb4
Fixed #10275 -- Corrected the edge case of rendering a LogEntry with a contenttype of None. Thanks to Jarek Zgoda for the report, and Peter Bengtsson for the patch
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-05 11:52:03 +00:00
Russell Keith-Magee
d7233e7c5a
Fixed #9932 -- Added a validation error when an inline tries to exclude the foreign key that provides the link to the parent model. Thanks to david for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:39:33 +00:00
Russell Keith-Magee
80a54dd23b
Fixed #9362 -- Prevented inline forms from overwriting the content_type_id attribute on objets being inlined. Thanks to carljm for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:38:36 +00:00
Russell Keith-Magee
f6cca736a0
Fixed #9609 -- Modified the clean method of(Null)Boolean field to accept '1' and '0' as valid inputs. Thanks to psagers for the patch.
...
This is required to support the use of non-default form widgets such as RadioSelect when the data comes from MySQL, which uses 1/0 to represent booleans.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02 14:52:34 +00:00
Russell Keith-Magee
fbf5eaac94
Fixed #10349 -- Modified ManyToManyFields to allow initial form values to be callables. Thanks to fas for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02 07:03:33 +00:00
Russell Keith-Magee
5e2d38465a
Fixed #10847 -- Modified handling of extra() to use a masking strategy, rather than last-minute trimming. Thanks to Tai Lee for the report, and Alex Gaynor for his work on the patch.
...
This enables querysets with an extra clause to be used in an __in filter; as a side effect, it also means that as_sql() now returns the correct result for any query with an extra clause.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-30 15:40:09 +00:00
Russell Keith-Magee
2ba9df2f41
Fixed #10082 -- Modified BaseFormSet so that ordering checks work when the formset is empty. Thanks to Petr Marhoun for the report and test case, and bmathieu for the fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-28 14:17:18 +00:00
Russell Keith-Magee
6312de0279
Fixed #10288 -- Corrected _has_changed handling of DateTimeInput, DateInput, TimeInput, and SplitDateTimeWidget when a custom date/time format is in use. Thanks to Koen Biermans for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-28 13:19:30 +00:00
Jacob Kaplan-Moss
6d1837a8bf
Fixed the tests from [9438] to work consistantly across databases. In particular, it was failing on newer versions of PostgreSQL after [10586].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22 22:38:14 +00:00
Jacob Kaplan-Moss
c00e8d2064
Added a `QuerySet.ordered` property to check if a queryset is already ordered. Refs #10163 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22 22:16:19 +00:00
Jacob Kaplan-Moss
6c15b5db60
Fixed #10208 : `ModelAdmin` now respects the `exclude` and `field` atributes of custom `ModelForm`s. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22 15:48:51 +00:00
Jacob Kaplan-Moss
ccc8e104ee
Fixed #10799 : fixed the use of list_editable with model inheritance and custom one-to-one parent links. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 21:03:29 +00:00
Jacob Kaplan-Moss
1e4ad6f118
Fixed #10002 : inline file uploads now correctly display prior data. Thanks, dgouldin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 20:29:55 +00:00
Jacob Kaplan-Moss
a075422bfc
Fixed #9122 : generic inline formsets now respect exclude and max_num. Thanks, Alex Robbins.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 20:12:53 +00:00
Jacob Kaplan-Moss
002e3fd9e4
Fixed #9124 : fixed `SelectDateWidget` with `required=False`. Thanks, Bernd Schlapsi.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 17:35:53 +00:00
Jacob Kaplan-Moss
41260fb931
Fixed #10156 : `ModelMultipleChoiceField.clean` now does a single query instead of O(N). Thanks, Alex Gaynor. Also, I ported a few more doctests to unittests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18 15:51:11 +00:00
Matt Boersma
800311964e
Fixed introspection test case which caused "ORA-00972: identifier is too long" errors against Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 22:32:48 +00:00
Russell Keith-Magee
419ed44436
Fixed #10363 -- Modified ModelForm handling to ensure that excluded fields can't be saved onto the model. Thanks to jgoldberg for the report, an Alex Gaynor for the fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 14:26:08 +00:00
Russell Keith-Magee
6590061a00
Fixed #9948 -- Corrected URLField validation to match RFC1035 (URL analog of #9890 ). Thanks to kratorius for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 14:25:18 +00:00
Russell Keith-Magee
48b459a83e
Fixed #9890 -- Modified the regex validation for email addresses to match RFC822/1035. Thanks to ozgur for the report, and kratorius for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 14:24:27 +00:00
Russell Keith-Magee
6cc0c3887c
Fixed #10458 -- Corrected the `next_month` and `previous_month` context variables provided with the generic month_archive view. The value returned now matches the docstring and the generic views documentation. Thanks to fperetti for the report and initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 13:23:03 +00:00
Russell Keith-Magee
fd3ee7d786
Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 07:07:51 +00:00
Russell Keith-Magee
0fec0a5d70
Fixed #10237 -- Corrected the handling of self-referential m2m fields when using multi-table inheritance. Thanks to Justin Lilly for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 02:59:40 +00:00
Malcolm Tredinnick
e9814029f5
Fixed #10692 -- Fixed DecimalField lookups for extreme values.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 05:32:23 +00:00
Malcolm Tredinnick
8931d8d688
Fixed #10675 -- Added unicode paragraph and line-sep handling to escapejs.
...
There were a couple of line breaking Unicode characters (\u2028 and
\u2029) that cause Javascript errors, at least in Firefox, if not
escaped. So now we do so. Based on a patch from rleland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 04:55:41 +00:00
Malcolm Tredinnick
87e6939372
Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 03:50:47 +00:00
Malcolm Tredinnick
50dbda9a3e
Added a test from Jamie Gennis to ensure #9848 doesn't reappear.
...
The bug itself was fixed at some point in the past months (there have
been a few improvements to update() recently). Fixed #9848 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 00:13:03 +00:00
Malcolm Tredinnick
92824e7102
Fixed #10738 -- Fixed content type values for deferred and proxy models.
...
Models with deferred fields, or which are proxying for an existing
model, now return the same ContentType object as the real model they
reflect. Thanks to tomasz.elendt for help with fixing this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 13:22:32 +00:00
Russell Keith-Magee
e12e0e18a4
Fixed #10197 -- Corrected pickling of querysets when a subset of fields was selected.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 13:20:51 +00:00
Russell Keith-Magee
0fff47c90f
Fixed #10766 -- Raise an error when annotate() references another aggreagte(). Thanks to aseering@mit.edu for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 12:09:34 +00:00
Malcolm Tredinnick
b1a5db37e6
Fixed #10369 -- Fixed auto-escaping inside "tran" and "blocktrans" tags.
...
Patch from Andrew Badr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 12:03:52 +00:00
Russell Keith-Magee
8dc73e8425
Fixed #10571 -- Ensured that unicode POST data is correctly encoded by the test client. Thanks to Rick Wagner for his help identifying and fixing this problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 09:20:10 +00:00
Malcolm Tredinnick
3bd384aa62
Fixed #10645 -- Added some robustness around some admin and modelform params.
...
Fieldset dictionary names, search fields and unique_together attribute
names all have to be convertible to strings (that has always been true).
If somebody passes in a unicode object, Python barfs because Django uses
those values as keyword argument names and function calls require
parameter names to be str objects. We now convert thing to strs
automatically.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 07:41:59 +00:00
Jacob Kaplan-Moss
a34b718192
Fixed #9640 , #10549 : BooleanFields with choices, a default, and null=False now correctly doesn't generate a blank option.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:54:31 +00:00
Jacob Kaplan-Moss
3524c74f0b
Converted model_fields regression tests into unittests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:54:14 +00:00
Adrian Holovaty
b366bcc962
Fixed #10753 -- Fixed regression in dispatcher after [10398]. Thanks for the patch and tests, minmax
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 18:58:32 +00:00
Jacob Kaplan-Moss
95f5e4a8da
Fixed #10774 : accessing form media types in templates (i.e. ``{{ form.media.js }}``) now works. Thanks, tarequeh and Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 17:07:25 +00:00
Malcolm Tredinnick
be4a83c448
Fixed #9315 -- Handle spaces in URL tag arguments.
...
Thanks Natalia Bidart and Matías Bordese for most of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 04:13:27 +00:00
Malcolm Tredinnick
f6309cbf80
Fixed #8515 -- Fixed validation of Polish REGON numbers.
...
Patch from Piotr Lewandowski.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 01:03:44 +00:00
Jacob Kaplan-Moss
641c5fd3b5
Fixed #7944 : date-based generic views no longer get confused with a numeric month format. Thanks to Justin Lilly and Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-09 15:23:56 +00:00
Jacob Kaplan-Moss
de91850944
Fixed #5563 : `BooleanField(null=True)` now raises a validation warning telling users to use `NullBooleanField` instead. Thanks, SamBull.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-09 15:09:35 +00:00
Jacob Kaplan-Moss
f55f2b9d74
Fixed #10059 : `ModelAdmin.formfield_for_dbfield` now handles custom `Field` subclasses. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 20:25:56 +00:00
Jacob Kaplan-Moss
28f6b71623
Fixed the test from [10447] to not depend on `os.listdir()` ordering. I always forget about that one; thanks, buildbot.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 19:41:18 +00:00
Jacob Kaplan-Moss
a64a61bf4a
Fixed #8422 : FilePathField now respects required=False.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 18:53:55 +00:00
Russell Keith-Magee
98ef7e85bd
Fixed #10666 -- Corrected the handling of inherited fields with aggregate() and annotate(). Thanks to julienb for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 13:19:48 +00:00
Jacob Kaplan-Moss
bbe37492dc
Added some tests to show that #9672 has been fixed ever since [10215]. Refs #9672 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 22:12:53 +00:00
Jacob Kaplan-Moss
6d6bbb6d05
Fixed #9756 : the for tag no longer leaves the context stack unbalanced when dealing with an empty iterable. Thanks, seanl.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 22:02:34 +00:00
Jacob Kaplan-Moss
2c3c1f3ec4
Fixed #9957 : feeds now respect time zone information provided by the pub date.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 21:20:14 +00:00
Jacob Kaplan-Moss
6319470f88
Fixed #10585 : comment redirects built from the `next` parameter now work correctly when `next` already contains a query string.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:49:07 +00:00
Russell Keith-Magee
366710e636
Fixed #10183 -- Corrected the handling of unicode in assertContains and assertNotContains. Thanks to trbs for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 12:06:05 +00:00
Jacob Kaplan-Moss
bb15cee58a
Made a bunch of improvements to admin actions. Be warned: this includes one minor but BACKWARDS-INCOMPATIBLE change.
...
These changes are:
* BACKWARDS-INCOMPATIBLE CHANGE: action functions and action methods now share the same signature: `(modeladmin, request, queryset)`. Actions defined as methods stay the same, but if you've defined an action as a standalone function you'll now need to add that first `modeladmin` argument.
* The delete selected action is now a standalone function registered site-wide; this makes disabling it easy.
* Fixed #10596 : there are now official, documented `AdminSite` APIs for dealing with actions, including a method to disable global actions. You can still re-enable globally-disabled actions on a case-by-case basis.
* Fixed #10595 : you can now disable actions for a particular `ModelAdmin` by setting `actions` to `None`.
* Fixed #10734 : actions are now sorted (by name).
* Fixed #10618 : the action is now taken from the form whose "submit" button you clicked, not arbitrarily the last form on the page.
* All of the above is documented and tested.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-06 20:23:33 +00:00
Karen Tracey
d0c897d660
Made a set of small test changes to avoid leaving temp files hanging around after running the test suite. First, fixed a couple of places where temp dirs were (or could be) created without later being deleted. Second, added a missing close() before unlink() since Windows raises an error on an attempt to remove an open file. Finally, in the file_uploads tests, avoided opening-by-name temporary files that we already have a descriptor for. Doing additional opens seems to run afoul of the Windows issue with deleting open files, so it generally works better to just seek back to 0 instead of calling open multiple times.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 20:59:20 +00:00
Karen Tracey
63143d5d9d
Fixed the test added for #9005 to use the e.args[0] instead of e.message. Exceptions didn't have 'message' before Python 2.5, and it was deprecated as of Python 2.6. args[0] works without error or DeprecationWarning from Python 2.3 through 2.6.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 19:34:52 +00:00
Karen Tracey
48e01d2b3d
Fixed up the introspection code and tests added for #9779 to run under Python 2.3, which has neither set nor rsplit.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 19:03:55 +00:00
Karen Tracey
bb31cf37ff
Replace test use of assertTrue with failUnless. No matter how many times we try, Python 2.3 still doesn't recognize assertTrue.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 17:51:35 +00:00
Karen Tracey
668bc4f7be
Fixed #10254 : Changed the regex in get_valid_filename to allow unicode alphanumerics (thanks gulliver). Also updated the file_uploads test for this case to check the name after saving the uploaded file. As it was the test ensured that files with unicode characters in their names could be uploaded, but it wasn't actually ensuring that the unicode characters were preserved through save.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 17:34:58 +00:00
Russell Keith-Magee
ff166a3cdc
Fixed #10065 -- Corrected an error message when an empty urlpattern object is provided. Thanks to Matthew Flanagan for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 06:54:56 +00:00
Malcolm Tredinnick
2b1934ff3c
Fixed a problem when computing deferred fields on multiple related models.
...
Fixed #10710 , as this fixes the second bug reported there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 05:35:01 +00:00
Malcolm Tredinnick
0a89a57ffc
Fixed deferred fields and select_related() interaction.
...
Loading related models when some fields were deferred was resulting in
incorrect offsets being used into the results row, causing the wrong data to be
assigned to attributes.
Refs #10710 . This fixes the first of two bugs reported there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 05:34:23 +00:00
Malcolm Tredinnick
dded5f52cc
Fixed #10695 -- Fixed implementation of deferred attribute retrieval.
...
The original implementation had a few silly bugs in it that meant that data was
not being used only on the instance of the class that it was appropriate for
(one of the traps when using class-level things). No more!
Thanks to Justin Bronn and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 03:21:31 +00:00
Jacob Kaplan-Moss
ffffdedfd1
Fixed #9991 : correctly introspect PostgreSQL 'real' types.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 20:52:54 +00:00
Jacob Kaplan-Moss
ffe8994014
Fixed #10522 : accept tuples in `generic_inlineformset_factor(exclude)`. Thanks, mk.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 20:03:46 +00:00
Jacob Kaplan-Moss
595c092a29
Fixed #9546 : GenericRelations inherited from base models no longer query using the wrong content type.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 19:52:14 +00:00
Malcolm Tredinnick
d2a8bc5b40
Fixed #10681 -- Work around (by ignoring) invalid ETag headers.
...
This is a hack to work around problems in the Real World. Apparently, Opera
9.64 has been observed sending malformed headers. We now compromise our high
principles and simply ignore such bad behaviour.
Patch from Ivan Sagalaev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 06:59:34 +00:00
Jacob Kaplan-Moss
9828557731
Fixed #9520 : make the date filter fail silently for non-date values. Thanks, Andrew Badr and Eric Holscher.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 05:20:25 +00:00
Jacob Kaplan-Moss
8cc506840e
Added tests for database introspection. Refs #9779 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 04:32:48 +00:00
Jacob Kaplan-Moss
25130b9675
Fixed #10670 : fixed reusing QuerySets previously used in a filter expression. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 01:49:12 +00:00
Jacob Kaplan-Moss
751234bfd9
Fixed the test in [10351] to work reguardless of the test settings.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 01:40:56 +00:00
Jacob Kaplan-Moss
8f7aa84def
Fixed #9651 : fixed save_as with inline forms. Thanks, kmike and Mnewman.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 00:01:15 +00:00
Brian Rosner
64e82fb648
Fixed #10043 -- widthratio tag now accepts a variable for the max_width argument.
...
The max_width argument now passes through FilterExpression which by side-affect
allows float values, but will be truncated.
Thanks obeattie and Eric Holscher for patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 23:41:36 +00:00
Jacob Kaplan-Moss
624caace17
Fixed #9005 : don't wig out when reversing a URL if SETTINGS_MODULE isn't set. While I was there, I fixed #10599 by re-raising the original error message, which is almost always a better idea. Thanks, Eric
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 22:46:46 +00:00
Joseph Kocherhans
dc832d7753
Fixed some silly assumptions about pk's that broke the test suite under postgresql.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 22:16:34 +00:00
Jacob Kaplan-Moss
16c9df0a76
Fixed #10016 : the cache middleware no longer vomits when handed long URLs. Thanks, Matt Croydon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 18:19:32 +00:00
Jacob Kaplan-Moss
e6ad4fb901
Fixed #9474 : user_passes_test may now be applied multiple times.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:17:38 +00:00
Jacob Kaplan-Moss
ee17cabba0
Fixed #9969 : choices with options groups (added in [7977]) now work correctly in the admin with list_display and list_filter. Thanks, ramiro.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 14:14:20 +00:00
Jacob Kaplan-Moss
da0c6908e8
Fixed #9473 : FormWizard now works with NullBooleanFields. As a bonus, we now have the beginnings of a test suite for FormWizard. Thanks, Keith Bussell.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 14:13:43 +00:00
Jacob Kaplan-Moss
f83af07ce3
Fixed #7510 : the ModelAdmin now uses `self.queryset` instead of the default manager. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 03:11:58 +00:00
Joseph Kocherhans
15becf23a9
Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 19:55:20 +00:00
Jacob Kaplan-Moss
a68c4a85ce
Fixed #10513 : floatformat now works with floatish things, not just real floats. Thanks, Alex.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 18:17:21 +00:00
Jacob Kaplan-Moss
cc5477df89
Fixed #7529 : added a FILES section to the debug view. As a bonus, we've now got
...
the start of a suite of tests for the debug views. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 17:10:06 +00:00
Gary Wilson Jr
b4f5655c86
Fixed #10553 -- Corrected several uses of `URLconf` in documentation and comments, according to the Django style guide. Based on patch from rduffield.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10256 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 16:07:07 +00:00
Gary Wilson Jr
7805afffd7
Fixed #10667 -- Added missing sys import.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 07:23:50 +00:00
Jacob Kaplan-Moss
184ea1c91f
Fixed #8847 , #10370 : added some missing methods to MultiValueDict after [8399]. Thanks, James Turk and rfk.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 06:30:07 +00:00
Jacob Kaplan-Moss
9ae873fcd8
Fixed #10184 : QueryDicts with multiple values can now be safely pickled. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 05:14:13 +00:00
Joseph Kocherhans
62353e8fe7
Fixed #9863 . A ForeignKey with editable=False to the parent in an inline no longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 00:03:34 +00:00
Jacob Kaplan-Moss
4378af21b6
Fixed #10537 : Fixed the foreign key add-another link in list_editable. Thanks, Alex and jezdez.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 23:16:34 +00:00
Gary Wilson Jr
13ea4a9133
Fixed #9978 -- Fixed a KeyError exception that was being raised when using the logout method on the test client on an unauthenticated user, based on patch from ericholscher.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:52:48 +00:00
Joseph Kocherhans
fea6c73538
Fixed #10149 . FileFields in a form now validate max_length. Based on a patch by Massimo Scamarcia.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:52:16 +00:00
Gary Wilson Jr
3e7f5131a5
Fixed #9065 -- Fixed the `timesince` and `timeuntil` template tags to work when both values involved are date objects, thanks to morty and mboersma for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 21:32:34 +00:00
Gary Wilson Jr
86c5142461
Fixed #10094 -- Fixed the `include` and `extends` template tags to work with filenames with spaces, patch from mcroydon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 20:30:28 +00:00
Joseph Kocherhans
08056572e8
Fixed #9587 . Formset.is_valid() now returns True if an invalid form is marked for deletion. Thanks for the test and intial patch, kratorius.
...
Note that this leaves the form and formset errors alone. Those forms still have errors, it's just that it doesn't matter that they're invalid in the context of the formset and deletion.
Also fixed #9665 while I was in there. Thanks, mark_hildreth.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 19:36:19 +00:00
Gary Wilson Jr
432f7f624a
Fixed #8462 -- Made `length` and `length_is` template filters fail silently when given a value that has undefined length and added tests for both filters. Based on patch from marcelor, rob, and SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 16:46:27 +00:00
Gary Wilson Jr
a6d7b418de
Made the template tests error output a bit more pretty.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 16:05:57 +00:00
Gary Wilson Jr
4a9b1f7a36
Removed an inadvertent raise statement added in [8777] and added the printing of tracebacks for template tests that raise an unhandled exception.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29 23:33:01 +00:00
Justin Bronn
da3b38cdda
Fixed #6064 -- Added the `connection_created` signal for when a database connection is created.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29 23:15:58 +00:00
Brian Rosner
69977d2045
Fixed #10622 -- Resolved an issue with model inheritence and list_editable. Thanks oyvind and Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29 18:52:38 +00:00
Malcolm Tredinnick
2c6c60cec6
Template filters now pass numerical arguments through as numbers.
...
This was the (undocumented) behaviour prior to r10118 and now it's back
again. It's neither hard nor harmful to maintain compatibility with the
old ways.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-25 03:45:56 +00:00
Russell Keith-Magee
214c79219e
Fixed #10589 -- Removed duplicated model definition in null_fk_ordering regression test. Thanks to Julien Phalip for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 11:35:48 +00:00
Malcolm Tredinnick
fd46f673bd
Fixed #9926 -- Fixes for some select_related() situations.
...
Using select_related(...) across a nullable relation to a multi-table
model inheritance situation no longer excludes results. Thanks to AdamG
for a test demonstrating part of the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 03:59:38 +00:00
Malcolm Tredinnick
e5a8d9e810
A bunch of improvements for conditional HTTP processing.
...
Fixed some typos in the code (fixed #10586 ). Added more tests. Made the
tests compatible with Python 2.3. Improved the documentation by putting
the good news and common use-case right up front.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 03:01:46 +00:00
Ian Kelly
64ddff1b11
Fixed a false failure in the test suite when running Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 22:01:16 +00:00
Jacob Kaplan-Moss
f0560dfdb2
Fixed #9282 : added a generic comment moderation toolkit. See the documentation for details.
...
This began life as (part of) James Bennett's comment-utils app, and was adapted to be part of Django by Thejaswi Puthraya and Jannis Leidel. Thanks, all!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 21:07:02 +00:00
Jacob Kaplan-Moss
44f3080226
Fixed #10505 : added support for bulk admin actions, including a globally-available "delete selected" action. See the documentation for details.
...
This work started life as Brian Beck's "django-batchadmin." It was rewritten for inclusion in Django by Alex Gaynor, Jannis Leidel (jezdez), and Martin Mahner (bartTC). Thanks, guys!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 20:22:56 +00:00
Malcolm Tredinnick
7db24dd2b0
Fixed #5756 , #6296 -- Most template tags can now handle filters in arguments.
...
Most of the hard work for this was done by akaihola.
There are still possibly some problems with the i18n template tags,
since they are written quite differently and a few other bug fixes have
to made before they can be fixed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 09:42:51 +00:00
Malcolm Tredinnick
a6f429e37e
Added consistent support for double- and single-quote delimiters in templates.
...
Some template filters and tags understood single-quoted arguments, others
didn't. This makes everything consistent. Based on a patch from akaihola.
Fixed #7295 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 09:40:25 +00:00
Malcolm Tredinnick
f5c07f89e3
Removed an invalid template test (translating an empty string is a bad idea).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 09:19:45 +00:00
Malcolm Tredinnick
3bb68004ff
Fixed #10581 -- Fixed conditional handling of If-Match headers.
...
The conditional processing decorator from r10114 wasn't parsing ETags
from an If-Match header correctly. Patch from Ivan Sagalaev (who also
did most of the work in r10114, before I rewrote parts of it and added
bonus bugs, although I forgot to thank him there).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-22 23:16:03 +00:00
Karen Tracey
14b160957e
Fixed #8962 -- Consistently support format and input_format in the various (individual, combined, split) date and time form fields and widgets.
...
Many thanks to Tai Lee for doing all the work here.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-22 16:13:06 +00:00
Malcolm Tredinnick
b203db6ec8
Fixed #5791 -- Added early-bailout support for views (ETags and Last-modified).
...
This provides support for views that can have their ETag and/or Last-modified
values computed much more quickly than the view itself. Supports all HTTP
verbs (not just GET).
Documentation and tests need a little more fleshing out (I'm not happy with the
documentation at the moment, since it's a bit backwards), but the functionality
is correct.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-22 07:58:29 +00:00
Malcolm Tredinnick
5ac154e065
Fixed deferred loading of fields with default values.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-22 01:45:22 +00:00
Jacob Kaplan-Moss
d7e8127524
Fixed #10194 : added `django.shortcuts.redirect`, a do-what-I-mean redirect shortcut. See the docs at topics/http/shortcuts for details.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-21 13:09:13 +00:00
Malcolm Tredinnick
fa89fdcd6b
Fixed #2698 -- Fixed deleting in the presence of custom managers.
...
A custom manager on a related object that filtered away objects would prevent
those objects being deleted via the relation. This is now fixed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 03:57:12 +00:00
Malcolm Tredinnick
255cb391d1
Fixed #10547 -- Worked around some odd behaviour in Python 2.3 and 2.4.
...
Calling the super() version of __reduce__ in Model.__reduce__ led to infinite
loops in Python prior to 2.5. We don't do that any longer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 01:37:11 +00:00
Malcolm Tredinnick
29050ef999
Fixed #5420 -- Added support for delayed loading of model fields.
...
In extreme cases, some fields are expensive to load from the database
(e.g. GIS fields requiring conversion, or large text fields). This
commit adds defer() and only() methods to querysets that allow the
caller to specify which fields should not be loaded unless they are
accessed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10090 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-19 09:06:04 +00:00
Russell Keith-Magee
ee2f04d79e
Fixed #10482 -- Unified access to response.context when inspecting responses from the test client. Thanks to James Bennett for the design, and Julien Phalip for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 10:46:55 +00:00
Malcolm Tredinnick
324eba99cb
Fixed #10526 -- More fixes when specifying installed apps using "foo.*".
...
This adds a case that was missed in r9924: underscore handling.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 00:59:40 +00:00
Jacob Kaplan-Moss
7bc0878922
Fixed #8939 : added a `list_editable` option to `ModelAdmin`; fields declared `list_editable` may be edited, in bulk, on the changelist page. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17 20:51:47 +00:00
Russell Keith-Magee
25e1c39bc3
Fixed #10517 -- Corrected cache name for file-based cache tests so that the filename can be valid under Windows. Thanks to Bob Thomas for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17 10:40:04 +00:00
Malcolm Tredinnick
7d9b29a56d
Use plain model.Manager, or suitable proxy, for model saving.
...
We can't use the default manager in Model.save_base(), since we need to
retrieve existing objects which might be filtered out by that manager. We now
always use a plain Manager instance at that point (or something that can
replace it, such as a GeoManager), making all existing rows in the
database visible to the saving code.
The logic for detecting a "suitable replacement" plain base is the same as for
related fields: if the use_for_related_fields is set on the manager subclass,
we can use it. The general requirement here is that we want a base class that
returns the appropriate QuerySet subclass, but does not restrict the rows
returned.
Fixed #8990 , #9527 .
Refs #2698 (which is not fixed by this change, but it's the first part of a
larger change to fix that bug.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:41:33 +00:00
Russell Keith-Magee
84ce18fc9b
Fixed #10425 -- Corrected the interaction of .count() with .annotate() when .values() is also involved. Thanks to kmassey for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-14 04:32:52 +00:00
Ian Kelly
0ae95f80b4
Fixed #10238 : coerce TextField values to unicode in the oracle backend.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10049 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-13 19:57:00 +00:00
Russell Keith-Magee
6d17020c1a
Fixed #10250 -- Added a regression test to ensure that GROUP BY statements are correctly quoted under MySQL. This appears to have been corrected inadvertently since the original report, but the extra regression test will make sure it stays that way.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 11:52:55 +00:00
Russell Keith-Magee
638dbc3e83
Fixed #6464 -- Added incr() and decr() operations on cache backends. Atomic on Memcache; implemented as a 2 stage retrieve/update on other backends. Includes refactor of the cache tests to ensure all the backends are actually tested, and a fix to the DB cache backend that was discovered as a result. Thanks to Michael Malone for the original patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11 13:27:03 +00:00
Ian Kelly
7daf0b9407
Refs #10443 : Added Oracle to the #10443 regression test exemption, since we don't yet support it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 22:48:42 +00:00
Russell Keith-Magee
3c8568a7dc
Fixed #10271 , #10281 -- Fixed the handling multiple inline models that share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 11:19:26 +00:00
Malcolm Tredinnick
d0fff8ccd4
Fixed #10439 -- Fixed a subtle test failure caused by r9994.
...
Thanks to Ramiro Morales for debugging what was going on here.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:51:06 +00:00
Malcolm Tredinnick
0516c5d921
Fixed #10443 -- Fixed model attribute updating after r10003.
...
Adding a get_db_prep_save() call to the UpdateQuery code path meant it
was being called twice if you updated an existing model attribute. This
change removes that double call and also makes TimeField.to_python() a
little more robust for the benefit of the Oracle backend (just in case).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:24:19 +00:00
Malcolm Tredinnick
ec9c03ce0b
Added an editorial comment to a test.
...
This is to stop me trying to "fix" that piece of code again in the future.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:23:42 +00:00
Malcolm Tredinnick
6e415a5f90
Fixed #9508 -- Added an appropriate FileField.__hash__ implementation.
...
Required because we declare a custom __eq__ method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:59:17 +00:00
Malcolm Tredinnick
242fc60520
Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
...
Patch from carljm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:39:48 +00:00
Malcolm Tredinnick
cd99c62e2d
Fixed #10432 -- Handle all kinds of iterators in queryset filters.
...
Only consumes the iterators once and works with Python 2.3.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 03:32:16 +00:00
Malcolm Tredinnick
53da1e4794
Fixed #9649 -- Better error handling in model creation.
...
Previously, you could explicitly assign None to a non-null ForeignKey
(or other) field when creating the model (Child(parent=None), etc). We
now throw an exception when you do that, which matches the behaviour
when you assign None to the attribute after creation.
Thanks to ales.zoulek@gmail.com and ondrej.kohout@gmail.com for some
analysis of this problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 04:51:05 +00:00
Malcolm Tredinnick
923f78f504
Improved table join handling for comparisons against NULL.
...
This fixes a broad class of bugs involving filters that look for missing
related models and fields. Most of them don't seem to have been reported
(the added tests cover the root cause). The exception is that this has
also fixed #9868 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:02:09 +00:00
Malcolm Tredinnick
f9c8eeb311
Fixed #10406 -- Fixed some problems with model inheritance and pk fields.
...
Manually specifying both a OneToOneField(parent_link=True) and separate a
primary key field was causing invalid SQL to be generated. Thanks to Ramiro
Morales for some analysis on this one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:21:14 +00:00
Malcolm Tredinnick
dfd7a6c781
Fixed #10251 -- Fixed model inheritance when there's also an explicit pk field.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:20:08 +00:00
Malcolm Tredinnick
0e93f60c7f
Fixed #10362 -- An update() that only affects a parent model no longer crashes.
...
This includes a fairly large refactor of the update() query path (and
the initial portions of constructing the SQL for any query). The
previous code appears to have been only working more or less by accident
and was very fragile.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:34:01 +00:00
Malcolm Tredinnick
dfddf129f0
Fixed #9701 -- Added a "safeseq" template filter.
...
This is like "safe", except it operates on the individual elements of a
sequence, rather than treating the whole argument as a string.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:16:33 +00:00
Malcolm Tredinnick
851461aa72
Fixed #10181 -- Handle an EmptyResultSet exception case properly in nested querysets.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 06:08:02 +00:00
Malcolm Tredinnick
cf3071242a
Factor out some common pieces of django.conf.LazySettings.
...
This is in preparation for some reuse elsewhere in the core code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:48:22 +00:00
Malcolm Tredinnick
ec710220dd
Fixed some test output in the wake of r9940.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:17:00 +00:00
Malcolm Tredinnick
152d517878
Fixed a misnamed test that was inadvertently hiding an earlier one.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 06:54:38 +00:00
Malcolm Tredinnick
c6a404d1e9
Fixed insert/update handling when no database interaction is required.
...
Fixed #10205 as part of this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 01:56:59 +00:00
Malcolm Tredinnick
bbea457fbb
Fixed #10202 -- Fixed another couple of slicing edge-cases with querysets.
...
Patch from Alex Gaynor and Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9924 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 01:24:03 +00:00
Malcolm Tredinnick
415ffa8df5
Fixed #10028 -- Fixed a problem when ordering by related models.
...
Some results were inadvertently being excluded if we were ordering across a
nullable relation which itself ordering by a non-nullable relation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 02:59:40 +00:00
Russell Keith-Magee
e735fe7160
Fixed #4476 -- Added a ``follow`` option to the test client request methods. This implements browser-like behavior for the test client, following redirect chains when a 30X response is received. Thanks to Marc Fargas and Keith Bussell for their work on this.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27 13:14:59 +00:00
Ian Kelly
8ffe8981f6
Fixed #10290 : do not use aliases when adding extra_selects to the GROUP BY clause, to generate compliant sql that will be accepted by Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-25 23:56:00 +00:00
Russell Keith-Magee
7d03ca9e86
Fixed #10161 -- Modified evaluation of query expressions to allow for operators that take the form of functions. This is mostly for the benefit of Oracle, but it should prove useful later on. Thanks to Ian for the report and feedback on the fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 11:15:31 +00:00
Jacob Kaplan-Moss
63d85a684a
Fixed #8630 : finished the custom comment app API that was left out of 1.0. This means it's now possible to override any of the models, forms, or views used by the comment app; see the new custom comment app docs for details and an example. Thanks to Thejaswi Puthraya for the original patch, and to carljm for docs and tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:16:26 +00:00
Russell Keith-Magee
542709d0d1
Fixed #10182 -- Corrected realiasing and the process of evaluating values() for queries with aggregate clauses. This means that aggregate queries can now be used as subqueries (such as in an __in clause). Thanks to omat for the report.
...
This involves a slight change to the interaction of annotate() and values() clauses that specify a list of columns. See the docs for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 14:47:59 +00:00
Russell Keith-Magee
b2a4377651
Fixed #9066 -- Added Czech localflavor. Thanks to Elvard for the contribution.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 07:51:57 +00:00
Jacob Kaplan-Moss
8ada8d7c03
Fixed #9214 : EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 20:47:39 +00:00
Russell Keith-Magee
2b1bb716ff
Fixed #10248 -- Corrected handling of the GROUP BY clause when using a DateQuerySet. Thanks to Alex Gaynor for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:38:11 +00:00
Russell Keith-Magee
fb64ea7896
Fixed #10132 -- Corrected the interaction of extra() queries with the values() clause. Thanks to Glen Maynard for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:29:31 +00:00
Russell Keith-Magee
58ea6d4561
Fixed #10256 -- Corrected the interaction of extra(select=) with values() and values_list() where an explicit list of columns is requested.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:28:37 +00:00
Brian Rosner
e5cd43e588
Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-11 20:13:17 +00:00
Russell Keith-Magee
d4a3a4b0ca
Fixed #10199 -- Modified aggregate() calls to clone the base query so that the base query can be reused. Thanks to Alex Gaynor for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-08 11:14:07 +00:00
Russell Keith-Magee
ecadf67569
Fixed #10127 -- Corrected (no, really, this time!) the way the select_related() cache is populated when annotations are also contained in the query. Thanks to Sylvain Pasche <sylvain.pasche@gmail.com> for the report and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 11:07:21 +00:00
Russell Keith-Magee
8f410a577b
Fixed #10127 -- Corrected handling of select_related() in annotate() calls. Thanks to Sylvain Pasche <sylvain.pasche@gmail.com> for the report and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-02 13:43:18 +00:00
Ian Kelly
c08e0ef649
Fixed some tests that relied on an arbitrary ordering of rows.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-30 20:15:41 +00:00
Ian Kelly
bd40c32f6c
Fixed some column names in the tests that were breaking the test suite on Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-30 20:02:42 +00:00
Russell Keith-Magee
cf37e4624a
Fixed #7210 -- Added F() expressions to query language. See the documentation for details on usage.
...
Many thanks to:
* Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
* Alex Gaynor for his help debugging and fixing a number of issues.
* Malcolm Tredinnick for his invaluable review notes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-29 10:46:36 +00:00
Russell Keith-Magee
08dd4176ed
Refs #10113 -- Modified the generated SQL to remove redundant GROUP BY elements, and modified the test added in [9788] to remove a test result that depended on a potentially ambiguous database ordering.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-24 14:16:25 +00:00
Russell Keith-Magee
15b1675af9
Fixed #10113 -- Ensured that joined fields mentioned in order_by() are included in the GROUP_BY clause on those backends that require it. Thanks to Koen Biermans <koen.biermans@werk.belgie.be> for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-24 06:53:54 +00:00
Russell Keith-Magee
0e15932be3
Fixed #10089 -- Corrected handling of aggregates when the query set contains no items (and the cursor returns None). Thanks to Kyle Fox for the report, and david for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 11:03:48 +00:00
Russell Keith-Magee
ed3d2735a2
Fixed #10100 -- Corrected handling of the negation required exclude() clauses that reference aggregate columns. Thanks to Anossov for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 07:07:51 +00:00
Russell Keith-Magee
39516803f1
Fixed #10064 -- Corrected handling of aggregate queries that also use select_related(). Thanks to olivius for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-20 12:23:48 +00:00
Karen Tracey
dd2e1356f0
Corrected code in serializers_regress testcase so that, in the case where an exception has been raised, rollback is called before attempting to leave transaction management. With the old code the original exception (IntegrityError on InnoDB) was getting hidden by a transaction management error resulting from attempting to leave transaction management with a pending commit/rollback.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-18 20:54:42 +00:00
Matt Boersma
b41a45f8e5
Fixed #5543 : callproc() and friends now work with Oracle and our FormatStylePlaceholderCursor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 22:23:58 +00:00
Jacob Kaplan-Moss
79138a6106
Fixed #10041 : use a tempdir for files in the forms test. Thanks, Marty Alchin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:31:58 +00:00
Matt Boersma
b120c74032
Changed "date" column to "start_date"--Oracle won't name columns with reserved keywords.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:18:21 +00:00
Jacob Kaplan-Moss
f212b24b64
Cleaned up and refactored `ModelAdmin.formfield_for_dbfield`:
...
* The new method uses an admin configuration option (`formfield_overrides`); this makes custom admin widgets especially easy.
* Refactored what was left of `formfield_for_dbfield` into a handful of smaller methods so that it's easier to hook in and return custom fields where needed.
* These `formfield_for_*` methods now pass around `request` so that you can easily modify fields based on request (as in #3987 ).
Fixes #8306 , #3987 , #9148 .
Thanks to James Bennet for the original patch; Alex Gaynor and Brian Rosner also contributed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 15:32:31 +00:00
Malcolm Tredinnick
d579e716fe
Fixed #9997 -- Fixed use of ValuesQuerySets as rvalues in filters.
...
Previous behaviour was pretty stupid. Let's never speak of it again. New
behaviour both works and is documented.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 10:59:43 +00:00
Karen Tracey
344f16e220
Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites.
...
This change may be slightly backwards incompatible, if existing tests need to test transactional behavior, or if they rely on invalid assumptions or a specific test case ordering. For the first case, django.test.TransactionTestCase should be used. TransactionTestCase is also a quick fix to get around test case errors revealed by the new rollback approach, but a better long-term fix is to correct the test case. See the testing doc for full details.
Many thanks to:
* Marc Remolt for the initial proposal and implementation.
* Luke Plant for initial testing and improving the implementation.
* Ramiro Morales for feedback and help with tracking down a mysterious PostgreSQL issue.
* Eric Holscher for feedback regarding the effect of the change on the Ellington testsuite.
* Russell Keith-Magee for guidance and feedback from beginning to end.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 02:30:22 +00:00
Russell Keith-Magee
cc4e4d9aee
Fixed #3566 -- Added support for aggregation to the ORM. See the documentation for details on usage.
...
Many thanks to:
* Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
* Alex Gaynor for his help debugging and fixing a number of issues.
* Justin Bronn for his help integrating with contrib.gis.
* Karen Tracey for her help with cross-platform testing.
* Ian Kelly for his help testing and fixing Oracle support.
* Malcolm Tredinnick for his invaluable review notes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 11:06:34 +00:00
Jacob Kaplan-Moss
1f84630c87
Fixed #6470 : made the admin use a URL resolver.
...
This *is* backwards compatible, but `admin.site.root()` has been deprecated. The new style is `('^admin/', include(admin.site.urls))`; users will need to update their code to take advantage of the new customizable admin URLs.
Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-14 20:22:25 +00:00
Jacob Kaplan-Moss
c01098e9cb
In urlconfs, include() may now be used on an iterable of patterns instead of just a module string. Refs #6470 -- making the admin use a urlconf is much easier with this work done. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-10 22:54:20 +00:00
Malcolm Tredinnick
c5bdfab9ae
Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:49:03 +00:00
Malcolm Tredinnick
d068ad0c01
Using querysets as an rvalue in filter() calls was causing an unnecessary
...
database query, due to a bool() call. This change stops that behaviour.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:16:21 +00:00
Malcolm Tredinnick
f747b61c20
Nested query support.
...
This extends previous functionality that allowed passing Query objects as the
rvals to filters. You can now pass QuerySets, which requires less poking at
opaque attributes. See the documentation of the "__in" lookup type for the
details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-05 11:47:48 +00:00
Malcolm Tredinnick
062a94ef45
Reconciling where- and having-clause behaviour.
...
Extricated the code that works directly with SQL columns (standard
"where" stuff) from the the code that takes SQL fragments and combines
it with lookup types and values. The latter portion is now more
generally reusable. Any existing code that was poking at Query.having
will now break in very visible ways (no subtle miscalculations, which is
a good thing).
This patch, en passant, removes the existing "having" test, since the
new implementation requires more setting up than previously. The
aggregates support (currently in a separate codebase) has tests for this
functionality that work as a replacement for the removed test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-05 11:47:14 +00:00
Russell Keith-Magee
096a9ecc5c
Fixed #9942 -- Added a to_python handler for FloatField to ensure correct typing of deserialized data before saving. Underlying problem is analogous to #8298 , fixed in [8515]. Thanks to David Larlet <larlet@gmail.com> for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-03 04:43:58 +00:00
Gary Wilson Jr
9af56803f5
Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an admin.py module with errors from raising a spurious AlreadyRegistered exception in a subsequent call to autodiscover.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23 18:25:24 +00:00
Karen Tracey
986e162c5d
Follow-up to r9656 -- beef up the added test to exercise all (one can hope) paths through the troublesome get_deleted_objects function and fix the resulting errors.
...
Refs #9859 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 17:42:18 +00:00
Karen Tracey
10894da8a8
Fixed #9859 -- Added another missing force_unicode needed in admin when running on Python 2.3. Many thanks for report & patch to nfg.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 15:04:47 +00:00
Malcolm Tredinnick
b96b450981
Fixed #9786 -- Fixed inequality checking for django.db.models.fields.file.FieldFile class.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 04:52:55 +00:00
Malcolm Tredinnick
a1cbeb9afb
If an SQL query doesn't specify any ordering, avoid the implicit sort
...
that happens with MySQL when a "GROUP BY" clause is included. This is a
backend-specific operation, so any other databases requiring similar
encouragement can have a function added to their own backend code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-10 05:19:27 +00:00
Malcolm Tredinnick
33c0f0de67
This fixes a group of problems in the SQL created by QuerySet.exclude() when
...
used in a few situations where NULL results can appear.
Fixed #8921 (the only ticket I know of that noticed any of these).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 02:39:51 +00:00
Malcolm Tredinnick
d4f0ae42a2
Fixed #9188 -- Fixed a case where we were generating syntactically invalid SQL in some exclude() queries.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-07 05:48:01 +00:00
Malcolm Tredinnick
bfab9d62ee
Added a way to iterate over hidden/visible fields in a form. Useful for manual
...
form layout.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-05 04:22:00 +00:00
Ian Kelly
4637a77ff8
Fixed #9706 : made SlugField honor max_length in Oracle, matching the other backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 18:40:40 +00:00
Russell Keith-Magee
5834b1837f
Fixed #9736 -- Added quoting to the SQL constraint names generated during table creation. This is to accommodate primary keys with spaces.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 13:23:29 +00:00
Jacob Kaplan-Moss
bd2b0059be
Here's the rest of [9530] where I actually rename the tag like I said I did. I swear this was git's fault, not mine.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-24 22:33:32 +00:00
Jacob Kaplan-Moss
4aa97f5c18
Fixed #6398 : added an optional `{% empty %}` clause to the `{% for %}` template tag. The contents of this clause are rendered if the list iterated over turns out to be empty. Thanks, Jannis Leidel.
...
Astute readers will notice that the patch originally called this `default`; after consideration I decided that `empty` is a very slightly better color for this particular bikeshed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-24 22:01:48 +00:00
Karen Tracey
8e350d036c
Fixed #9608 : Ensured a Model's default repr() is printable even if its __unicode__ method raises a Unicode error.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 18:58:43 +00:00
Malcolm Tredinnick
9d0bacebd2
Fixed #3501 -- Fixed date filtering in querysets for nullable date fields. Only
...
affects SQLite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 08:48:24 +00:00
Brian Rosner
f63929dbe2
Fixed #9258 -- Use _default_manager in ForeignKeyRawIdWidget.label_for_value. Thanks nullie for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15 02:20:00 +00:00
Malcolm Tredinnick
0349d83289
Fixed #6948 -- The join filter was escaping the literal value that was
...
passed in for the connector. This was contrary to what the documentation
for autoescaping said and to what every other filter does with literal
strings as arguments.
This is backwards incompatible for the situation of the literal string
containing one of the five special HTML characters: if you were writing
{{ foo|join:"&" }}, you now have to write {{ foo| join:"&" }}.
Previous behaviour was, as noted, a bug and contrary to what was
documented and expected.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15 01:16:20 +00:00
Karen Tracey
02e67bba47
Fixed #9592 -- Create data for the generic_inline_admin test during setup instead of via a fixutre since it uses a content type id which will vary depending on what other tests have been run.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14 14:47:46 +00:00
Brian Rosner
f751d5b713
Fixed #9498 -- Handle a formset correctly when the foreign key is not available (for now).
...
This case pops up with generic foreign key inlines after [9297]. Added tests
to handle future regressions with generic foreign key inlines in the admin.
Thanks markus and danielr for patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-13 19:03:44 +00:00
Russell Keith-Magee
95d8c0619a
Fixed #9351 -- Modified the test client to pass on URL encoded parameters to the underlying views. Thanks to sime for the suggestion.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12 11:22:05 +00:00
Karen Tracey
cb6a5886f6
Fixed #5079 -- Avoid converting Decimals to floats during save to the database.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12 00:35:24 +00:00
Karen Tracey
ad4e1a7a72
Add tests mistakenly left out of r9397.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 20:01:51 +00:00
Karen Tracey
d82aaef844
Fixed #7064 : Made DemicmalField validation support max_digits equal to decimal_places.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 19:52:53 +00:00
Karen Tracey
8cdc53a265
Fixed #6035 -- Gave the SplitDateTimeField the proper default widget. Thanks dtulig.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 19:42:55 +00:00
Karen Tracey
6ed91234e3
Fixed #8910 -- Added force_unicode during admin log message creation to avoid triggering a Python 2.3 bug. Thanks for the report joshg and patch nfg.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 17:13:41 +00:00
Karen Tracey
c367e2869e
Fixed #9514 -- Made admin change_form template correctly recognize/report when a form has only a single error.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-09 18:51:28 +00:00
Karen Tracey
b81bc22ad2
Fixed #5748 -- Made floatformat filter round properly on all platforms and handle NaN input correctly on Windows. Also added tests for these cases. Thanks for the report and initial patch to SmileyChris and PJCrosier.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-08 01:44:46 +00:00
Karen Tracey
bcd63cbfb0
Fixed #6160 , #9111 -- Consistently apply conditional_escape to form errors and labels when outputing them as HTML.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 19:49:24 +00:00
Russell Keith-Magee
7e03244f03
Added new fixture file accidentally left out of [9357].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 11:21:06 +00:00
Russell Keith-Magee
b2d2c570b7
Fixed #9011 -- Corrected handling of fixture files that contain errors to correctly report the broken fixture name. Thanks to jlrivitti@gmail.com for the report and initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 11:19:13 +00:00
Karen Tracey
2026934600
Fixed #8966 -- Changed is_safe for length_is filter to False, since its return value is a boolean, not a string.
...
Thanks Thomas Steinacher and carljm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 19:00:49 +00:00
Karen Tracey
03070a9955
Fixed #7179 -- Changed breadcrumbs on the add page so that a link to the change view is not included when the user doesn't have permission for that view. Also added tests to ensure the link is not there when it shouldn't be, and there when it should be. Thanks for the report & patch alen__ribic.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 19:14:24 +00:00
Malcolm Tredinnick
3b5d975ff6
Fixed #9411 -- Changed the test from r9081 to be more robust across different database backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 06:24:04 +00:00
Malcolm Tredinnick
9319dc496c
Fixed #9406 -- Ensure that each database column is only represented once in the
...
"ORDER BY" clause of an SQL statement.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 06:09:47 +00:00
Malcolm Tredinnick
e3aa9a2828
Fixed #9383 -- Don't open a network connection for sending email if there's
...
nothing to send. Saves a bit of time when, for example, processing 500-error
emails with no ADMINs configured. Based on a patch from Jesse Young.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 04:38:43 +00:00
Karen Tracey
30241385d5
Fixed #9252 -- Moved the try/except protecting against incorrect lookup params to where the error is now raised, and added a test for this case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-22 23:09:35 +00:00
Karen Tracey
ae43d11838
Fixed #3096 -- Make admin list_filters respect limit_choices_to.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 19:03:21 +00:00
Jacob Kaplan-Moss
d7c829c98e
Yet more file storage testing cleanup for the sake of buildbots; this should be the last of it, I hope.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 22:13:16 +00:00
Jacob Kaplan-Moss
b21ea0a836
More be-nice-to-the-buildbot: be better about cleaning up files created by the cache/session tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 21:41:12 +00:00
Ian Kelly
9a72913edd
Fixed .distinct() not working with slicing in Oracle, due to the
...
row numbers necessarily being distinct.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 17:15:58 +00:00
Karen Tracey
05d695908c
Fixed #9053 -- Allowed for sorting of callable and ModelAdmin methods specified in list_display (added in r8352). Previously attempting to sort on the former would raise an exception and the latter simply didn't sort. Also added tests for this function. Thanks rgl and jenan.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 14:47:01 +00:00
Malcolm Tredinnick
7e7a370e20
Fixed #9319 -- Fixed a crash when using the same model field in multiple
...
unique_together constraints.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 10:09:44 +00:00
Malcolm Tredinnick
559aca7d78
A queryset that has had ordering removed (order_by()) can have ordering added
...
again later (order_by('foo')). Or, at least, it can now. Thanks to Ilya
Novoselov for diagnosing the problem here.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 09:45:27 +00:00
Malcolm Tredinnick
44f228fd61
Fixed #6748 -- When printing the repr() of querysets, don't load or display
...
more than 20 objects.
This means that accidentally executing HugeStoryArchive.objects.all() at the
interactive prompt (or in the debug template) won't try to load all 4,233,010
stories into memory and print them out. That would previously cause resource
starvation and other "interesting" crashes.
If you really, really want the previous behaviour (e.g. in a doctest that
prints more than 20 items), display "list(qs)" instead of just "qs".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:38:33 +00:00
Malcolm Tredinnick
268ef594ac
Applying a limit to a queryset that already had an upper limit of 0 wasn't
...
working properly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:37:35 +00:00
Malcolm Tredinnick
ce770aaecd
The tests added in r9184 were altering the test environment in bad ways. Fixed
...
this with proper setUp() and tearDown() methods.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:36:41 +00:00
Malcolm Tredinnick
70b6c4c015
Fixed #9233 -- Allow date and message-id headers to be passed in manually in
...
email messages. Previously we were creating duplicate headers, which was bad.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 12:20:01 +00:00
Malcolm Tredinnick
cd8eeaacf5
Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETE
...
and OPTIONS support. Thanks Scott Barr and Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 09:23:40 +00:00
Malcolm Tredinnick
30b568226f
Fixed #9199 -- We were erroneously only prepending "www" to the domain if we
...
also needed to append a slash (when PREPEND_WWW=True).
Based on a patch and tests from gonz. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 08:22:50 +00:00
Malcolm Tredinnick
8fb1459b52
Added some better error reporting and path handling when creating template paths.
...
We now raise UnicodeDecodeError for non-UTF-8 bytestrings (thanks to Daniel
Pope for diagnosing this was being swallowed by ValueError) and allow UTF-8
bytestrings as template directories.
Refs #8965 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06 06:34:54 +00:00
Malcolm Tredinnick
7cec38b076
Fixed #9259 -- Fixed a validation error for Spanish identity card numbers.
...
Patch from Marc Garcia.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:59:04 +00:00
Malcolm Tredinnick
8524089769
Add internationalisation support to the comment templates. Fixed #8868 , #8905
...
Thanks to zgoda for a patch that did most of the internationalisation part.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:09:21 +00:00
Malcolm Tredinnick
227a93b64f
Fixed #8803 -- Allow authenticated users without first_name/last_name values set to post comments.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:07:32 +00:00
Malcolm Tredinnick
d343aa3022
Altered a failing url template tag test to work more reliably.
...
There's no guarantee about the order in which ambiguous patterns are resolved.
The solution is "don't do that" and avoid ambiguity.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 04:59:55 +00:00
Russell Keith-Magee
a855755711
Fixed #9293 : Corrected expected test output for the admin_scripts tests, following the changes to --verbosity in 9110. Thanks to Alex for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-04 01:16:30 +00:00
Malcolm Tredinnick
37ee86b7ee
Fixed another case of reverse URL resolving that wasn't working.
...
This is a similar situation to that fixed in r9087. We weren't merging
multiple levels of include() calls together correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-30 05:52:35 +00:00
Malcolm Tredinnick
baa960209f
Fixed Queryset.dates() in the presence of extra-select columns.
...
Any extra(select=...) columns can be ignored in the SQL for dates, since we are
only interested in extracting distinct date values. We were previously
including them by accident and it was generating incorrect SQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-28 04:36:10 +00:00
Malcolm Tredinnick
15b0158e39
Fixed #9038 -- Correctly handle URL patterns with the same name (or view name),
...
declared independently and that differ only by argument signatures.
Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-27 06:14:11 +00:00
Malcolm Tredinnick
6c7cf34d69
Fixed #9171 -- Fixed a few places where we were assuming lists instead of
...
generic sequences in ModelForm structures. Patch from mrmachine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-27 05:57:10 +00:00
Malcolm Tredinnick
922aba3def
Fixed a missing variable initialisation deep in the Query bowels.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-22 00:31:22 +00:00
Malcolm Tredinnick
9931c9e132
Fixed #9125 -- When displaying errors for a form with only hidden fields, make sure the resulting XHTML is correct.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-18 07:16:08 +00:00
Malcolm Tredinnick
a27ff1c8ae
Fixed #8865 -- Improved the robustness of some file path tests.
...
Based on a patch from pythonhead@gentoo.org .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 09:32:36 +00:00
Adrian Holovaty
8efeaea9dd
Fixed #9073 -- Fixed a unit test that broke after [9002]. Thanks, kratorius
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 05:52:29 +00:00
Malcolm Tredinnick
e47cc781d8
A bug from queryset-refactor days: although the Query class has "group_by" and
...
"having" attributes, only the former was included in the resulting SQL, meaning
subclasses had to completely duplicate Query.as_sql() if they were using any
kind of grouping filtering on the results.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-11 02:00:27 +00:00
Malcolm Tredinnick
d88688014f
Fixed #7588 -- Inherit fields from concrete ancestor classes via abstract base
...
classes. Based on a patch from emulbreh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 18:38:43 +00:00
Malcolm Tredinnick
7bc5db3a88
Changed the tests added in r8898 very slightly so that they don't return
...
unintended results. Doctests aren't self-contained yet when run as part of
the full suite. Refs #5624 , #8835 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 17:59:09 +00:00
Malcolm Tredinnick
780f239fa7
Fixed #8825 -- Fixed a small error model field setup (on the model class) from
...
r8855. Patch from Christofer Bernander. Test based on one from cgrady.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 05:53:50 +00:00
Malcolm Tredinnick
61cc4a1eee
Fixed #8819 -- Don't include two copies of extra-select columns in the query.
...
This was triggered by r8794, but was, in fact, fairly fragile before then. The
current fix is the correct way we should be doing this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 03:48:25 +00:00
Jacob Kaplan-Moss
0e5faf225c
Security fix. Announcement forthcoming.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 21:10:00 +00:00
Brian Rosner
c1de41f4d2
Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent with the form/formset factories. Refs #8071 to make it easier to get at exclude. Thanks julien for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:26:24 +00:00
Malcolm Tredinnick
f31425e8e2
Fixed #7154 -- Inherit all model managers from abstract base classes.
...
Also added documentation describing how manager inheritance works (and when
manager aren't inherited). Based on some patches from sebastian_noack and
emulbreh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 09:04:54 +00:00
Brian Rosner
0cd5caa6a8
Fixed #8787 -- Fixed failing admin_widgets tests. This fixes ManyToManyRawIdWidget which was broken with [8823]. Thanks Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 06:10:14 +00:00
Malcolm Tredinnick
12f6259903
Fixed #8439 -- Complex combinations of Q-objects (using both conjunctions and
...
disjunctions) were producing incorrect SQL when nullable relations were
involved. This fixes that.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 02:16:41 +00:00
Malcolm Tredinnick
a9465a75de
Fixed a case of incorrect parsing of quanitifers in reg-exp patterns.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 23:03:03 +00:00