Malcolm Tredinnick
588eeb356c
Fixed a problem when constructing complex select_related() calls.
...
Avoids joining with the wrong tables when connecting select_related() tables to
the main query. This also leads to slightly more efficient (meaning less tables
are joined) SQL queries in some other cases, too. Some unnecessary tables are
now trimmed that were not previously.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 01:02:11 +00:00
Malcolm Tredinnick
1834428648
Fixed a problem with values() and values_list() queries and nullable joins.
...
Previously, if we were querying across a nullable join and then a non-nullable
one, the second join would not be a LEFT OUTER join, which would exclude
certain valid results from the result set.
This is the same problem as [7597] but for values() field specifications, so
this covers the second case where Django adds extra stuff to the select-clause.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 01:01:21 +00:00
Russell Keith-Magee
b8f7b39ccc
Fixed #7155 -- Corrected DateQuerySet to handle nullable fields. Thanks to fcaprioli@alice.it for the original report and patch, and to Jeremy Dunck for the test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-25 13:38:06 +00:00
Luke Plant
b1851cca3e
Fixed bug with Model.delete() which did not always delete objects in the right order.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-21 20:57:05 +00:00
Luke Plant
7c621535a2
Added tests for corner case with deleting where objects are deleted in the wrong order.
...
These tests currently fail, by design, fix will be committed shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-21 20:55:17 +00:00
Luke Plant
17bc2820bb
Removed some unnecessary work in Model._collect_sub_objects()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-21 16:37:44 +00:00
Russell Keith-Magee
e829e9ff8f
Fixed #7044 -- Corrected a minor typo in a docstring in the model loader. Thanks, msaelices.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-17 13:58:19 +00:00
Adrian Holovaty
06315375ce
Fixed #7420 -- Abstracted some more database options into DatabaseFeatures -- supports_usecs, time_field_needs_date, interprets_empty_strings_as_nulls and date_field_supports_time_value -- and changed various hard-coded 'if DATABASE_BACKEND == oracle' statements to use the new options. Thanks to ramiro for the patch
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:15:04 +00:00
Russell Keith-Magee
57311b5998
Fixed #7256 -- Corrected queryset code to return the correct set of columns when the query has an empty values() clause as well as extra selects from an extra() clause. Thanks to Nicolas Lara for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-15 06:24:41 +00:00
Gary Wilson Jr
0b8fafc7f1
Fixed #7387 - Fixed circular import problem when importing `contrib.contenttypes.generic` module.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-15 04:49:29 +00:00
Adrian Holovaty
ac5b9f5857
Fixed #7427 -- Fixed docstring that was rendered incorrect due to qs-rf. Thanks, ramiro
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 04:23:14 +00:00
Adrian Holovaty
5309e18cbf
Fixed #7026 -- Fixed misleading/incorrect exception text when adding to a many-to-many set on an object that doesn't yet have a primary-key value. Thanks for the report, ryan@peaceworks.ca
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 04:13:16 +00:00
Adrian Holovaty
a08b2dd328
Negligible comment typo fixes
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 03:37:13 +00:00
Jacob Kaplan-Moss
b5f92938ab
Fixed #7298 : prevent update() on sliced QuerySet since UPDATE doesn't reliably support LIMIT/OFFSET. Thanks, George Vilches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-09 16:17:54 +00:00
Russell Keith-Magee
12716794db
Fixed #7350 , #7202 -- Fixed serialization for multi-model inheritance, which had multiple problems:
...
* Serializers were including all superclass fields in their output. Now only local fields are included.
* Implicit OneToOne primary keys were not correctly added to the metamodel, so they were always marked to be serialized, even though they were primary
* Model saving was too aggressive about creating new parent class instances during deserialization. Raw save on a model now skips saving of the parent class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-09 14:03:35 +00:00
Jacob Kaplan-Moss
31d9dc07aa
Fixed #7369 : fixed a corner-case involving select_related() following non-null FKs after null ones. Thanks, George Vilches
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-08 18:13:46 +00:00
Jacob Kaplan-Moss
50de13343b
Fixed #7342 : Ignore any Meta options starting with '_', thus making it OK for Meta to be a newstyle class. Thanks, Gulopine.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7585 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-07 20:01:18 +00:00
Jacob Kaplan-Moss
1452d46240
Fixed #6886 : Tightened up ForeignKey and OneToOne field assignment. Specifically:
...
* Raise a ValueError if you try to assign the wrong type of object.
* Raise a ValueError if you try to assign None to a field not specified with null=True.
* Cache the set value at set time instead of just at lookup time.
This is a slightly backwards-incompatible change; see BackwardsIncompatibleChanges for more details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-05 00:39:32 +00:00
Russell Keith-Magee
5837a45bd9
Fixed #7173 -- Corrected the caching of objects in reverse OneToOne relationships. Thanks, Travis Terry.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 12:17:03 +00:00
Russell Keith-Magee
8a0b8d93b2
Fixed #7286 -- Added functools wrapping to the transaction decorators. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7558 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 11:50:50 +00:00
Russell Keith-Magee
b2b7a0c1cc
Fixed #7306 -- Added missing import. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 11:41:46 +00:00
Gary Wilson Jr
d78e61e8bb
Fixed #7212 -- Added `alters_data` attribute to `Model.save_base` method, thanks Gulopine.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-13 14:56:47 +00:00
Ian Kelly
3c4d353016
Cleaned up some comments in the Oracle backend. Fixes #7139 . Thanks, adamv.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-05 16:04:50 +00:00
Ian Kelly
db6bab5cb3
Fixed an Oracle error on double negations in where conditions. Fixed #7111
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-29 20:55:10 +00:00
Malcolm Tredinnick
2061b3f3ca
Undo [7474]. I didn't think it through nearly carefully enough.
...
This means that all model construction now goes through the __init__() method
again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-29 01:19:42 +00:00
Adrian Holovaty
14d6ee2dc9
Changed Query.get_columns() to quote the 'AS' column names in an extra_select situation, to match pre-queryset-refactor behavior. Added unit tests that verify this and provide an example
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 21:15:05 +00:00
Malcolm Tredinnick
a97f690e5d
Added the ability to pickle and unpickle QuerySets and Query classes.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 14:14:41 +00:00
Malcolm Tredinnick
db80f57c6e
ValuesQuerySets (and subclasses) were inadvertently not caching their results.
...
Fixed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 12:09:23 +00:00
Malcolm Tredinnick
ba010ec1c0
Made some types of nested update queries very slightly more efficient at the
...
database level. Also worked around the fact that MySQL (and maybe other
backends we don't know about) cannot select from the table they're updating.
Fixed #7095 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 11:51:52 +00:00
Malcolm Tredinnick
1bb8260084
Allow Query objects to be values in query filters. This already existed for
...
relations, but not for normal fields. The latter comes up naturally in some
update statements.
Refs #7095
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 07:07:17 +00:00
Malcolm Tredinnick
e07a457c00
Fixed #7096 -- The simplifications in [7461] weren't complete. They broke
...
multi-component exclude() calls. Fixed that.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 04:29:06 +00:00
Malcolm Tredinnick
356dfd5308
Fixed #7098 -- Old-style related-model order_by() syntax was being incorrectly
...
marked as erroneous. It's just more dangerous and risky, not forbidden. This
commit restores backwards compatibility there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 02:27:19 +00:00
Adrian Holovaty
81edb50cac
Migrated _setup_query() docstring to America
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:58:42 +00:00
Adrian Holovaty
a209115969
Fixed a bug with the new QuerySet update() method where it wasn't committing the transaction (on Postgres, at least)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:58:21 +00:00
Adrian Holovaty
d649d0f5f8
Fixed #7097 -- dates() queries now work as expected with select_related() -- that is, select_related() has no effect on the query. Thanks for reporting, Marco
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:20:40 +00:00
Malcolm Tredinnick
d0c49e7b77
When retrieving a field by name, handle a missed case when the cache cannot be
...
initialised yet.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 11:44:11 +00:00
Malcolm Tredinnick
9c52d56f6f
Merged the queryset-refactor branch into trunk.
...
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.
Fixed #245 , #1050 , #1656 , #1801 , #2076 , #2091 , #2150 , #2253 , #2306 , #2400 , #2430 , #2482 , #2496 , #2676 , #2737 , #2874 , #2902 , #2939 , #3037 , #3141 , #3288 , #3440 , #3592 , #3739 , #4088 , #4260 , #4289 , #4306 , #4358 , #4464 , #4510 , #4858 , #5012 , #5020 , #5261 , #5295 , #5321 , #5324 , #5325 , #5555 , #5707 , #5796 , #5817 , #5987 , #6018 , #6074 , #6088 , #6154 , #6177 , #6180 , #6203 , #6658
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Malcolm Tredinnick
35afdedbed
Fixed #6433 -- Handle some varied PostgreSQL version strings (beta versions and
...
Windows version strings). Patch from jerickso.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7415 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-13 02:04:10 +00:00
Ian Kelly
15a39f7fe5
Fixed #5985 : Changed the lookups in the Oracle backend to use LIKEC instead of LIKE.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-10 17:44:40 +00:00
Malcolm Tredinnick
c30a050e41
Removed the ado_mssql database backend.
...
It has not been maintained, contains bugs, and improved versions are available
externally(e.g. django-mssql and django-pyodbc at Google code).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-26 08:25:48 +00:00
Adrian Holovaty
3d779efbe5
Fixed #6867 -- Added some missing DeprecationWarnings to db.models.fields.related. Thanks, dcramer
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-25 05:13:08 +00:00
Malcolm Tredinnick
89e7b673d8
Fixed #5531 -- Changes a while back meant we are handling import errors from
...
database backends differently now. Which meant the MySQLdb version check was
being swallowed. Changed the exception type to ensure this is percolated
correctly. Patch from Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-24 14:02:44 +00:00
Malcolm Tredinnick
b3b8422363
Fixed #6445 -- Allow model instances to be used as a default for ForeignKeys
...
(via a callable). Also updates the documentation of the "default" attribute to
indicate a callable can be used. Thanks, Philipe Raoult.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 06:56:23 +00:00
Jacob Kaplan-Moss
4457ba002d
Fixed #5894 : added FilePathField to newforms. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 22:29:11 +00:00
Malcolm Tredinnick
1b331f6c1e
Fixed #6641 -- If we lose a race when creating a new object in get_or_create,
...
re-get the result from the database and return that. Thanks, Jeff Guinness and
Timothée Peignier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 14:08:40 +00:00
Ian Kelly
4f5f8735e3
Fixed #6666 : Corrected a bind param formatting issue when performing 'year' lookups on DateFields using Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 19:31:42 +00:00
Malcolm Tredinnick
732074541a
Fixed #5883 -- Added __iter__ methods to the debug cursor and the postgresql backend cursor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 14:15:15 +00:00
Jacob Kaplan-Moss
a9b4efc82b
Re-enable substring lookups for IP address fields in Postgres using HOST() Thanks for the suggestion, Thomas Adamcik. Fixes #708 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 23:12:47 +00:00
Jacob Kaplan-Moss
f7fbc289ad
Reverted [7151] since it breaks exact IP lookups on PostgreSQL. Reopens #708
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 22:17:45 +00:00
Jacob Kaplan-Moss
df5fef33c9
Beefed up support for "lazy" related objects. Now, in addition to ForeignKey("Model") you can also say ForeignKey("app.Model"). This means that cross-app recursive relations now work.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 21:13:16 +00:00
Malcolm Tredinnick
6482f1f887
Fixed #708 -- Fixed searching within IP fields on PostgreSQL.
...
Based on a patch from Matt McClanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23 09:15:35 +00:00
Malcolm Tredinnick
32402773f1
Fixed #3689 , #5223 -- Fixed "1st of January" comparisons for SQLite without breaking the other backends.
...
Based on a patch from raminf and tests from Nebojsa Djordjevic.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7150 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23 08:36:41 +00:00
Malcolm Tredinnick
6a796690e6
It makes sense that when you subclass an existing model field, you're often
...
going to be using the same database column type. Made that properly
inheritable (previously it was using the class name), at the cost of a little
more verboseness.
This is very slightly backwards incompatible (for subclasses of existing fields
that were relying on the old default).
Fixed #6556 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 02:58:41 +00:00
Malcolm Tredinnick
343fa35a2c
Fixed #2936 , #6500 -- Added a __hash__() method to Models (since we implement our own __eq__ method).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 01:59:34 +00:00
Malcolm Tredinnick
f1a24be01c
Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).
...
Found by Bastian Kleineidam with help from pyflakes. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 00:08:08 +00:00
Malcolm Tredinnick
16928a79e6
Tweaked [7098] to follow a more duck-typing approach.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-15 06:40:23 +00:00
Russell Keith-Magee
7d2a8f0e18
Fixed #6596 -- Corrected minor typo in comment. Thanks, cbmeeks@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-13 23:28:58 +00:00
Malcolm Tredinnick
5480a1eecf
Fixed #6214 -- Added some small optimisations to model class initialisation.
...
Thanks, Ivan Illarionov.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-08 12:01:23 +00:00
Gary Wilson Jr
cc7c6f3e46
Fixed #5422 -- Added a `raw` parameter to model `pre_save` and `post_save` signals, based on patch from `graham.carlyle@maplecroft.net`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-01 17:32:29 +00:00
Joseph Kocherhans
fd20365b27
Fixed #6302 . FileField no longer requires a value if one already exists. Thanks Brian Rosner and Øyvind Saltvik.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-17 18:03:21 +00:00
Ian Kelly
6929c0d4d1
Fixed #6254 : Made fetchone() in the oracle backend correctly convert
...
strings to unicode objects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-04 22:51:22 +00:00
Matt Boersma
c5d3a925c7
Set Oracle stmtcachesize to 20 instead of 0 for a performance boost.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-21 18:49:07 +00:00
Matt Boersma
72d279a29f
Rearranged an Oracle ALTER statement so it is run only once per new connection, not on every cursor creation. Thanks, Ian Kelly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-20 23:06:30 +00:00
Malcolm Tredinnick
9229c34163
Fixed #6212 -- Give models.NullBooleanField the right default newforms field. Patch from SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 10:35:53 +00:00
Ian Kelly
ed5eca598e
Fixed ORA-01461 error when trying to store more than 4000 bytes in a TextField under Oracle
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 02:22:40 +00:00
Malcolm Tredinnick
90093e7965
Fixed #6147 -- Typo fix (that amazingly didn't stop the code working) in the code for loading a database module. Thanks, guido@python.org.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-09 10:18:56 +00:00
Malcolm Tredinnick
805c364fcf
Fixed #3511 -- Changed QuerySet.get() to return a MultipleObjectsReturned exception, rather than an assertion error. Thanks, Gary Wilson and cheeming.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:21:07 +00:00
Malcolm Tredinnick
5e5768ae83
Fixed #3323 -- More robust error handling for related objetcs. Thanks, Greg
...
Kopka and shaleh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:10:07 +00:00
Malcolm Tredinnick
348f2cbfc1
Fixed #5996 -- Add a pyscopg2 convertor for SafeUnicode -> unicode. Thanks, remco@diji.biz
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 22:26:24 +00:00
Ian Kelly
bbc3a95557
Fixed #6007 : Added DEFAULT_TABLESPACE and DEFAULT_INDEX_TABLESPACE
...
options to global_settings.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 19:23:49 +00:00
Ian Kelly
c750f01b48
Fixed a PL/SQL syntax bug causing manage.py sqlall to fail when piped to
...
sqlplus, introduced in [5950].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 18:50:43 +00:00
Malcolm Tredinnick
260f9c5112
Fixed #5989 -- Fixed a problem with values being incorrectly reused by
...
reference in field subclassing. Thanks, flupke.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:30:49 +00:00
Malcolm Tredinnick
d0f5a58fbd
Fixed #4653 -- Improved the logic to decide when to include (and select as
...
initial value) the blank choice for a model field with choices. Thanks to
Ilya Semenov for persisting with this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:32:18 +00:00
Malcolm Tredinnick
a4ea8d4e93
Fixed #3291 -- Allow calling get_absolute_url() with extra positional and
...
keyword arguments. Not usually required, but useful for people wanting to write
some kinds of customisations. Patch from __hawkeye__.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:32:09 +00:00
Malcolm Tredinnick
ea100b607a
Added the small changes necessary to make creating custom model fields easier.
...
Also includes some tests for this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-05 13:59:42 +00:00
Malcolm Tredinnick
595e75e8dd
Fixed #5729 -- For MySQL (only), always delay the creation of foreign key
...
references, for all tables, until after the table has been created. This means
that when using the InnoDB storage engine, true foreign key constraints are
created (inline "REFERENCES" are ignored by InnoDB, unfortunately).
Fully backwards compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 05:05:24 +00:00
Adrian Holovaty
c599de2ac6
Added a BaseDatabaseOperations.last_executed_query() hook, which allows a database backend to specify how to get the last-executed query on a given cursor. Implemented it for the psycopg2 backend. This means that for psycopg2, the SQL statements in django.db.connection.queries will now reflect the exact SQL as sent to the server, instead of a naive and misleading string-interpolated version
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23 19:00:31 +00:00
Malcolm Tredinnick
f20b254ccc
Fixed #899 -- Use model field default values as formfield initial values in
...
form_for_model(). Patch from David Danier and PhiR. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 13:01:40 +00:00
Gary Wilson Jr
73f495158c
Fixed #5710 -- Fixed a missing table name quoting in the postgresql backend, thanks davep@atomicdroplet.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 05:53:56 +00:00
Malcolm Tredinnick
185848a526
Fixed #5641 -- Handle lazy translations correctly when used as default arguments. Thanks, permon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-04 01:55:51 +00:00
Jacob Kaplan-Moss
960c1263b6
Fixed #5559 : instances sent via post-save signals no longer have pks of None. Thanks, Joseph Kocherhans.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-24 18:27:42 +00:00
Jacob Kaplan-Moss
980fa8b827
Fixed #231 : all fields that should take max_length now do. Thanks, Don Spaulding.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 23:33:57 +00:00
Malcolm Tredinnick
c012b8964e
Fixed #4067 -- Fixed validation of IPAddressFields in newforms. Thanks to neils and the team in the Copenhagen sprint group.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 11:38:32 +00:00
Malcolm Tredinnick
e2409750f8
Fixed #3703 -- Added pk property to models. Thanks, Collin Grady and jeromie@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 01:57:25 +00:00
Jacob Kaplan-Moss
07447a0f56
Fixed #5454 : settings.DATABASE_BACKEND may now refer to an external package (i.e. one located outside the Django source. Thanks, George Vilches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 19:25:20 +00:00
Malcolm Tredinnick
388182b622
Fixed #3032 -- Added some useful methods and attributes so that AnonymousUser can proxy for a User a bit more logically. Patch from semenov.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 18:01:29 +00:00
Malcolm Tredinnick
7a6abfdd3b
Fixed #5444 -- Changed manipulator class construction to use type(), rather than types.ClassType(). Helps with Jython compatibility. Patch from Leo Soto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 11:06:32 +00:00
Malcolm Tredinnick
1baae32e16
Fixed #4879 -- Added 'created' arg to post_save signal. This is True is a new object is created. Patch from George Vilches.
...
Fully backwards compatible, because signal receivers do not have to be able to accept all the arguments (thankyou, robust_apply()).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 09:14:51 +00:00
Russell Keith-Magee
cf3c94b26d
Fixed #4415 -- Added formfield method to PositiveIntegerField, so that those fields get validated correctly. Thanks, Oggie Rob.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 02:37:07 +00:00
Ian Kelly
8c5214d9b4
Made Oracle backend cast CharField values of None to u'' instead of ''
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 23:23:55 +00:00
Jacob Kaplan-Moss
4c0ac53ff8
Fixed a missing import in mysql backend. Thanks for pointing it out, mattmcc.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 23:02:39 +00:00
Ian Kelly
17cd87a264
Fixed an Oracle sqlflush / sequence reset column name bug exposed by the new test case in [6195].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 22:07:54 +00:00
Adrian Holovaty
dfdbf9ec1e
Fixed #5161 -- Changed MySQL backend only to report warning once. Thanks, durdinator
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 22:05:58 +00:00
Ian Kelly
f180d95903
Fixed #4896 : fixed #4765 : Patch for cursor.executemany using oracle and
...
sqlite3. Thanks, jdetaeye@www.frepple.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 21:32:25 +00:00
Adrian Holovaty
9cccf59db5
Fixed #5460 -- unique_together now accepts a single tuple for convenience. Thanks, Deryck Hodge
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 20:36:53 +00:00
Adrian Holovaty
0d52d2b2f9
Fixed #5342 -- Added max_length parameter to EmailField. Thanks, donspaulding and gwilson
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 19:22:43 +00:00
Jacob Kaplan-Moss
eea935a7f4
Fixed #5448 : you can now use unicode characters in primary keys. Thanks, pigletto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:36:04 +00:00
Matt Boersma
a6b1d65e33
Fixed #5226 . Now we check the Oracle version and give an explicit
...
error when we encounter a regex operator that isn't supported on 9i or
earlier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:26:07 +00:00
Ian Kelly
93f60163e8
Fixed #5218 : Made Oracle create autoinc triggers using the correct name
...
of the AutoField column rather than always assume "ID".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:12:36 +00:00
Jacob Kaplan-Moss
42f4f44356
Fixed #3146 : DateFields no longer barf when confronted by strings. Thanks, Deepak Thukral.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 16:48:47 +00:00