Commit Graph

6801 Commits

Author SHA1 Message Date
Justin Bronn 68f81c873d Fixed #10397 -- made GIS test runner compatible with changes in r9756.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:01:20 +00:00
Ian Kelly ad6ce1e6f9 Clarified documentation regarding Oracle's treatment of nulls and empty strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-05 20:21:22 +00:00
Malcolm Tredinnick 7197a4dcb7 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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 10:39:29 +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 14c8e5227a 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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:33:23 +00:00
Malcolm Tredinnick c7a1a9f380 Changed the handling of as_sql() versus _as_sql() in Query/QuerySet from r9928.
This avoids inadvertently hiding AttributeError that is raised for other
reasons.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 04:56:20 +00:00
Malcolm Tredinnick f5063914b3 Fixed #10381 -- Fixed some a machine-dependent test failure after r9921.
The patch is from Russell, but I'm applying it because I want my tests to pass
again (and he doesn't see the failure).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 04:53:15 +00:00
Justin Bronn 9b8c712ca7 Fixed #10159 -- `F()` expressions now work on geographic fields. The tests are in `relatedapp`, which has been retrofitted to work with Oracle (minus the prior offending tests). I'm back.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 22:10:15 +00:00
Malcolm Tredinnick 7b55da0501 Final piece (he says, hopefully) of r9945 changes.
This time, "django-admin.py diffsettings" is fixed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:48:02 +00:00
Malcolm Tredinnick fdca9e55e8 Fixed #10395 -- Fixed more fallout from r9945.
(Simultaneously, stop django.contrib.gis using some internal attribute when
there's a perfectly good public property available to do the same thing.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:45:15 +00:00
Malcolm Tredinnick 5e8ddd59e2 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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 01:40:47 +00:00
Jarek Zgoda d79655bdc9 Updated Czech localflavor in Polish translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:49:47 +00:00
Malcolm Tredinnick 00d89f80a5 Fixed #10392 -- Fixed an oversight from the refactoring in r9945.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 08:24:14 +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 a605a8fe08 Small edit to the caching docs.
Turns out, super-lightning is not faster than normal lightning. :-)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 05:46:04 +00:00
Malcolm Tredinnick a08267bf6a Removed some import-time dependencies on Django's settings.
Now you can import the file storage stuff and still call settings.configure()
afterwards. There is still one import-time usage of settings in
django.contrib.comments, but that's unavoidable.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 04:48:47 +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 8f28a84a98 The database cache wasn't correctly handling expired keys. Fixed now.
The cache tests have been failing for a long time with the db backend. This
change makes them pass again, so no test changes required here.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 03:15:27 +00:00
Malcolm Tredinnick e2cb2725eb Fixed #10013 -- Updated French translation.
Thanks, Claude Paroz and Stéphane Raimbault

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 00:33:37 +00:00
Malcolm Tredinnick 79f6cce291 Fixed #10385 -- Fixed a typographical error in the Czech regions list.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 00:26:55 +00:00
Jannis Leidel 2c338d7570 Updated German translation, fixes #10189. Thanks julianb
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 14:23:40 +00:00
Malcolm Tredinnick b740706707 Changed the way cache specifiers are parsed.
Allows us to reuse the same code in multiple places, avoiding new and
interesting bugs (the testing framework had a DIY version that was slightly
wrong, for example). Fixed #9833.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 08:13:38 +00:00
Malcolm Tredinnick d77236960a Fixed #9548 -- Correctly detect existence of empty sessions with cache backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:32:41 +00:00
Malcolm Tredinnick 70911bf98d Fixed #8737 -- Made the PostgreSQL version number detection more flexible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:18:57 +00:00
Malcolm Tredinnick 238477f90c Fixed #8706 -- Improved the way we detect available database backends.
Thanks, victor@egenix.com.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:12:38 +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 3242df16e4 To avoid an unfortunately common user-error, rename QuerySet.as_sql().
This was never a public API method, so this is backwards compatible, unless
you're poking at the internals. Refs #10352.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 04:12:30 +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
James Bennett 5fcd75ce14 Fixed #10377: Added clearer warning to database notes for cx_Oracle 5.0.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 06:03:18 +00:00
Russell Keith-Magee db2a95f6f5 Fixed #5610 -- Added the ability for dumpdata to take individual model names, as well as entire applications. Thanks to David Reynolds for his work on this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 05:35:22 +00:00
Malcolm Tredinnick b337884fcf Fixed #10048 -- Handle non-existent timezone in dateformat functions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 04:51:13 +00:00
Malcolm Tredinnick beb20057a3 Fixed #10165 -- Use settings.TEST_RUNNER in runtests.py
This permits running Django's core tests under an alternative test runner. Most
likely useful to non-CPython implementations, rather than much else (since
Django's core tests might assume things about the test runner).

Patch from Leo Soto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 04:46:38 +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
Malcolm Tredinnick 4ad77254b4 Fixed #10011 -- Updated Thai translation from Kowito Charoenratchatabhan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 01:29:00 +00:00
Malcolm Tredinnick 75a396bc64 Fixed #9634 -- Updated Slovak translation. Thanks Marcel Telka and scrool.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 01:17:21 +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
Malcolm Tredinnick e20f09c2d0 Fixed #10006 -- Avoid inadvertently using third-party "json" module.
In r9707 we added a preference to use Python's standard json module (Python 2.6
and beyond). However, there is also a third-party module called json that was
being picked up by accident if it was installed. It isn't API compatible, so
bad things happened. This change avoids that problem.

Patch from markmuetz.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27 05:14:11 +00:00
Malcolm Tredinnick 0dd4ec654f Invalidate the appropriate SITE_CACHE entry when saving a Site model.
This avoids the problem of, for example, saving a change to the Site model in
the admin interface and then seeing the wrong instanec returned in the next
call to get_current_site().

It's still possible to end up with an inconsistent cache if update() is used to
change the Site model, but that's pretty unavoidable. It's also a slightly odd
way to update a Site model, so if you really need to do that, you can manage to
call SiteManager.clear() at the same time.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27 04:57:33 +00:00
Luke Plant 1306079a02 Fixed #10017 - PasswordResetForm.clean_email was not returning the value.
Thanks Zak Johnson, Leo


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-26 17:11:28 +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 86a048b4e0 Fixed #10344 -- Corrected some typos in the aggregation docs. Thanks to ewoudenberg for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 22:51:14 +00:00
Karen Tracey 5f9ac28856 Fixed #10347 -- Fixed incorrect AttributeError raised when attempting to access a FileField without an instance. Thanks for the report and patch dc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 17:24:08 +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 28605a9c26 Whitespace fix to [9896].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9897 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 02:31:09 +00:00
James Bennett 1b9bbb546a Add trove classifiers to setup.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 02:28:16 +00:00