Commit Graph

6588 Commits

Author SHA1 Message Date
Malcolm Tredinnick 50379f4c91 [1.0.X] Fixed #9994 -- Fixed admin filtering when to_field is used on relations.
Thanks to jzylks for diagnosing this one.

Backport of r10139 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 07:14:19 +00:00
Malcolm Tredinnick 2fba099779 [1.0.X] 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.

Backport of r10136 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 05:54:35 +00:00
Ian Kelly 2b098e64e0 [1.0.X] Added an import that should have been included in [10126].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 22:14:00 +00:00
Ian Kelly 7499416d0d [1.0.X] Fixed a false failure in the test suite when running Oracle. Backport of [10125] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 22:11:07 +00:00
Malcolm Tredinnick ebfe7faaa3 [1.0.X] 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.

Backport of r10104 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 22:14:31 +00:00
Russell Keith-Magee 083a7206e4 [1.0.X] Corrected svnmerge-integrated property from r10086, updated to include some recent changes.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 12:38:39 +00:00
Russell Keith-Magee f781205859 [1.0.X] Corrected a problem with the database cache backend, and refactored the cache test suite to ensure that all the backends are actually tested.
Partial merge of r10031 and r10071 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 12:28:53 +00:00
Russell Keith-Magee 0abd798b9b [1.0.X] Fixed #10102 -- Set svn:executable on daily_cleanup script. Thanks to John Scott for the report
Merge of r10054 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10085 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 12:02:25 +00:00
Malcolm Tredinnick 39c450cc6d Fixed #10526 -- More fixes when specifying installed apps using "foo.*".
This adds a case that was missed in r9925: underscore handling.

Backport of r10078 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 01:08:34 +00:00
Jacob Kaplan-Moss 75b286798f [1.0.X] `ModelAdmin` validation now runs when using the `site.register(Model, **kwargs)` form.
Backport if [10074] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17 20:51:06 +00:00
Jacob Kaplan-Moss 6b85095169 [1.0.X] Fixed `BaseFormSet.is_multipart()` so that it doesn't bomb when called on an empty formset.
Backport of [10073] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17 20:47:47 +00:00
Malcolm Tredinnick 4d6763128f [1.0.X] Documented patterns for adding extra managers to model subclasses.
This seems to have been a source of confusion, so now we have some explicit
examples. Fixed #9676.

Backport of r10058 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:46:26 +00:00
Malcolm Tredinnick 8a0a17628b [1.0.X] Clarified and expanded documentation for Manager.use_for_related_fields.
This is for Manager subclasses that are default managers, but only
sometimes.  The general rule is: "don't use it." If you really need it,
read the instructions.

Backport of r10057 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:45:56 +00:00
Malcolm Tredinnick 97321c7645 [1.0.X] 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.)

Backport of r10056 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10059 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:45:32 +00:00
Ian Kelly 0eac35ce11 [1.0.X] Fixed #10488: fixed DB cache backend test failures in Oracle. Backport of [10051] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-13 21:07:41 +00:00
Ian Kelly 0ced9f68f3 [1.0.X] Fixed #10238: coerce TextField values to unicode in the oracle backend. Backport of [10049] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-13 19:58:56 +00:00
Malcolm Tredinnick 6922925abc [1.0.X] Fixed a problem from r10038. Fixed #10470.
Backport of r10040 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 08:00:46 +00:00
Malcolm Tredinnick a02247ff73 [1.0.X] Fixed #10472 -- Fixed a race condition in reverse URL resolving.
This only shows up in for reverse() (not forwards resolving), since that
path uses a globally shared resolver object. Based on a patch from
Travis Terry.

Backport of r10037 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 07:37:37 +00:00
Malcolm Tredinnick fdde600f42 [1.0.X] Fixed #10470 -- Fixed a race condition in middleware initialization.
Thanks to Travis Terry and mrts.

Backport of r10036 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 07:37:08 +00:00
Ian Kelly 75cc96bc6f [1.0.X] Backport of [10024] from trunk. 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/branches/releases/1.0.X@10025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 22:50:37 +00:00
Ian Kelly 9a5942cd60 [1.0.X] Backport of 10022 from trunk. Added savepoint support to the Oracle backend, necessary per the thread at http://groups.google.com/group/django-developers/browse_thread/thread/c87cf2d97478c068/
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10023 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 18:38:45 +00:00
Russell Keith-Magee 6ab4b64bd0 [1.0.X] Updated svnmerge properties for some recent updates.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 12:18:39 +00:00
Russell Keith-Magee ee0320f634 [1.0.X] 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.
Backport of r10017 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 12:08:17 +00:00
Malcolm Tredinnick ea350187a5 [1.0.X] Fixed #10439 -- Fixed a subtle test failure caused by r9995.
Thanks to Ramiro Morales for debugging what was going on here.

Backport of r10015 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:55:55 +00:00
Malcolm Tredinnick c545e88b81 [1.0.X] Fixed #10443 -- Fixed model attribute updating after r10004.
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).

Backport of r10013 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:26:40 +00:00
Jannis Leidel 9c770e05d4 [1.0.X] Updates German translation, fixes #10444
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 16:44:50 +00:00
Malcolm Tredinnick 6fe80b2a93 [1.0.X] Pass values through get_db_prep_save() in a QuerySet.update() call.
This removes a long-standing FIXME in the update() handling and allows for
greater flexibility in the values passed in. In particular, it brings updates
into line with saves for django.contrib.gis fields, so fixed #10411.

Thanks to Justin Bronn and Russell Keith-Magee for help with this patch.

Backport of r10003 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 00:07:50 +00:00
Malcolm Tredinnick b1fd7650a9 [1.0.X] Fixed #9626 -- Fixed a deletion race in the locmem cache.
Backport of r9998 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 10:02:23 +00:00
Malcolm Tredinnick 055c01103d [1.0.x] Fixed #9508 -- Added an appropriate FileField.__hash__ implementation.
Required because we declare a custom __eq__ method.

Backport of r9997 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 10:01:59 +00:00
Malcolm Tredinnick 244bb7e601 [1.0.X] Fixed #9469 -- Apply the fix from r9189 to the WSGI handler as well.
This is a defensive encoding fix. No functionality change for correct URLs.
Patch from magneto.

Backport of r9996 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 10:01:22 +00:00
Malcolm Tredinnick 7dcf651bc5 [1.0.X] Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
Patch from carljm.

Backport of r9994 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:41:37 +00:00
Malcolm Tredinnick 34b530fce7 [1.0.X] Fixed #9399 -- Added StopFutureHandlers to export list in file handling.
Thanks, George Vilches.

Backport of r9992 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:33:14 +00:00
Karen Tracey 8baac83f30 [1.0.X] Updated svnmerge integrated metadata to include changesets merged via other means.
Branch is up-to-date with trunk fixes.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 05:33:30 +00:00
Karen Tracey 20973954da [1.0.X] Block translation updates and one more new function fix from merge to branch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 04:52:07 +00:00
Karen Tracey 9c5eafe7d5 [1.0.X] Block new function (and fixes to same) from snvmerge.py consideration.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 04:12:56 +00:00
Malcolm Tredinnick fd5d0cdebb [1.0.X] Fixed #10432 -- Handle all kinds of iterators in queryset filters.
Only consumes the iterators once and works with Python 2.3.

Backport of r9986 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 03:37:47 +00:00
Malcolm Tredinnick 84b890b66e [1.0.X] 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.

Backport of r9983 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 04:53:33 +00:00
Malcolm Tredinnick dd5300274f [1.0.X] Fixed #6710 -- Made DATABASE_OPTIONS work with postgresql_psycopg2 backend.
Thanks to rcoup for the patch.

Backport of r9981 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:38:38 +00:00
Malcolm Tredinnick 31e059c9b3 [1.0.X] 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 #9968.

Backport of r9979 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:09:59 +00:00
Ian Kelly de442c3ab6 [1.0.X] Clarified documentation regarding Oracle's treatment of nulls and empty strings. Backport of [9976] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-05 20:22:54 +00:00
Malcolm Tredinnick 79f53b4f20 [1.0.X] Made it explicit if you accidentally override a Field from a parent model.
This was always not working reliably (model initialization and serialization
were two of the problems). Now, it's an explicit error. Also, documented.

Fixed #10252.

Backport of r9974 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 10:40:50 +00:00
Malcolm Tredinnick 182301c8df [1.0.X] 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.

Backport of r9971 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:24:30 +00:00
Malcolm Tredinnick dce458cde2 [1.0.X] Fixed #10251 -- Fixed model inheritance when there's also an explicit pk field.
Backport of r9970 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:23:18 +00:00
Malcolm Tredinnick b57d86f226 [1.0.X] Changed the row count value returned from update queries in some cases.
If an update only affected an ancestor model (not the child), we were
returning 0 for the number of rows updated. This could have been
misleading if the value is used to detect an update occuring. So we now
return the rowcount from the first non-trivial query that is executed
(if any). Still a slight compromise, but better than what we had.

Backport of r9966 from trunk (turns out this *is* a bugfix, since the returned
rowcount is used in Model.save(force_update=True)).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:40:22 +00:00
Malcolm Tredinnick f1c9080984 [1.0.X] 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.

Backport of r9967 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:35:10 +00:00
Malcolm Tredinnick dcb0884d68 [1.0.X] Final pieces (he says, hopefully) of r9945 changes.
Fixed "django-admin.py diffsettings" and some GeoDjango stuff.
Refs #10395.

Backport of r9960 and r9961 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:50:23 +00:00
Malcolm Tredinnick 9e6d32edde [1.0.X] Minor update to documentation for many-to-many filter() calls.
Removed a potential ambiguity when describing how multiple conditions in one
filter() call are handled.

Backport of r9958 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 01:44:26 +00:00
Malcolm Tredinnick f520f440e1 [1.0.X] Fixed #10013 -- Updated French translation for 1.0 branch.
Thanks, Stéphane Raimbault and Claude Paroz.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 23:17:10 +00:00
Jarek Zgoda 8928a8c9f8 [1.0.X] Polish translations updated
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:53:23 +00:00
Malcolm Tredinnick 888b154e9b [1.0.X] Fixed #10392 -- Fixed an oversight from the refactoring in r9947.
Backport of r9953 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:26:07 +00:00