Claude Paroz
de4bfb3fad
Simplified verbose_name_raw property
2015-01-08 15:08:26 +01:00
Josh Smeaton
8713ea7568
Fixed null handling in Value expression
2015-01-07 19:07:49 -05:00
Michał Modzelewski
ee86e59051
Refs #2443 -- Allowed creation of objects with NULL DurationFields
2015-01-07 08:33:26 -05:00
Josh Smeaton
5a4ac4ead9
Fixed #24078 -- Removed empty strings from GenericIPAddressField
2015-01-07 08:08:36 -05:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Tim Graham
c87ee41954
Fixed #23861 -- Added an API to deprecate model fields.
...
Thanks Markus Holterman and Berker Peksag for review.
2015-01-05 11:35:36 -05:00
Markus Holtermann
05f702b94c
Renamed flag for detecting managers built from QuerySets with as_manager().
2015-01-05 10:30:15 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Tim Graham
40a8504357
Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.
...
Thanks Markus Holtermann for review.
2015-01-01 13:30:52 -05:00
Piotr Pawlaczek
41fc1c0b5e
Fixed #23758 -- Allowed more than 5 levels of subqueries
...
Refactored bump_prefix() to avoid infinite loop and allow more than
than 5 subquires by extending the alphabet to use multi-letters.
2014-12-31 08:48:28 -05:00
Tim Graham
93d73dac91
Moved DatabaseCreation.data_types properties to DatabaseWrapper.
...
refs #22340 .
2014-12-31 08:29:17 -05:00
Josh Smeaton
1cdfbde4db
Fixed #23753 -- Oracle failure with Coalesce
2014-12-29 19:44:13 +11:00
Josh Smeaton
4718296546
Fixed #23753 -- Added a suite of SQL Functions
...
Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
2014-12-27 15:27:27 +11:00
Niclas Olofsson
3daa9d60be
Fixed #10414 -- Made select_related() fail on invalid field names.
2014-12-24 14:54:30 -05:00
Tim Graham
69ee7c8d76
Removed models.Field.bind() -- unused/undocumented since at least 1.0.
2014-12-23 14:23:58 -05:00
Anssi Kääriäinen
f233bf47dd
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
2014-12-23 10:54:25 -05:00
Marc Tamlyn
962bb9b6bd
Refs #2443 -- Move the durationfield converter logic.
...
This reduces how frequently this logic is run significantly.
Thanks to Anssi for the suggestion.
2014-12-23 10:41:42 +00:00
Marc Tamlyn
5ca82e710e
Fixed #24033 -- Use interval type on Oracle.
...
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
2014-12-23 10:38:32 +00:00
Marc Tamlyn
57554442fe
Fixed #2443 -- Added DurationField.
...
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.
Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.
Thanks to Tim and Josh in particular for reviews.
2014-12-20 18:28:29 +00:00
Anssi Kääriäinen
4a2a433e7d
Refs #24020 -- return expressions from get_group_by_cols()
2014-12-18 06:01:07 -07:00
Claude Paroz
108b8bf852
Fixed #24007 -- Ensure apps registry's ready before unpickling models
...
This prevents AppRegistryNotReady errors when unpickling Django
models from an external script.
2014-12-17 18:33:32 +01:00
Markus Holtermann
aa5ef0d4fc
Fixed #23822 -- Added support for serializing model managers in migration
...
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Markus Holtermann
e37ab311fc
Changed internal storing of abstract and concrete managers to be in a single list.
...
This commit prepares the internal manager layout to be serialized by
migrations; refs #23822 .
2014-12-15 08:32:47 -05:00
Michael Hall
895dc880eb
Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range
2014-12-13 12:45:58 -05:00
Carl Meyer
c72eb80d11
Fixed #23455 -- Accept either bytes or text for related_name, convert to text.
2014-12-12 12:50:39 -07:00
Carl Meyer
8aaf51f94c
Revert "Fixed #23455 -- Forced related_name to be a unicode string during deconstruction."
...
This reverts commit 45bd7b3bd9
.
2014-12-12 12:50:39 -07:00
Josh Smeaton
267a1dcd9b
Fixed #23941 -- Removed implicit decimal formatting from expressions.
2014-12-12 10:17:48 -05:00
Marc Tamlyn
6b2d3f9206
Remove text-mangling of default values.
2014-12-09 09:10:51 +00:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
Anssi Kääriäinen
ab89414f40
Fixed #23853 -- Added Join class to replace JoinInfo
...
Also removed Query.join_map. This structure was used to speed up join
reuse calculation. Initial benchmarking shows that this isn't actually
needed. If there are use cases where the removal has real-world
performance implications, it should be relatively straightforward to
reintroduce it as map {alias: [Join-like objects]}.
2014-11-28 07:30:26 -05:00
Anssi Kääriäinen
c7175fcdfe
Fixed #901 -- Added Model.refresh_from_db() method
...
Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham
for reviews.
2014-11-28 06:54:00 -05:00
Thomas Chaumeny
6b5d82749c
Fixed #16731 -- Made pattern lookups work properly with F() expressions
2014-11-28 12:50:42 +02:00
Diego Guimarães
f39b0421b4
Fixed #23338 -- Added warning when unique=True on ForeigKey
...
Thanks Jonathan Lindén for the initial patch, and Tim Graham
and Gabe Jackson for the suggestions.
2014-11-27 19:42:30 -05:00
Anssi Kääriäinen
bd337184f1
Fixed #23877 -- aggregation's subquery missed target col
...
Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
2014-11-27 06:50:08 -05:00
Anssi Kääriäinen
c7fd9b242d
Fixed #23875 -- cleaned up query.get_count()
2014-11-27 06:26:53 -05:00
MattBlack85
e9d1f1182a
Fixed #23801 -- Added warning when max_length is used with IntegerField
2014-11-26 18:41:54 -05:00
Anssi Kääriäinen
cbb5cdd155
Fixed #23867 -- removed DateQuerySet hacks
...
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Simon Charette
9cebb95348
Adjusted a comment to reflect some app refactor changes.
2014-11-26 09:47:37 -05:00
Collin Anderson
d4ea4eea79
Fixed #23889 -- Added more usage of quote_name_unless_alias() to avoid deprecation warnings.
2014-11-21 16:44:50 -05:00
Simon Charette
c7087bc777
Fixed #23862 -- Made ManyToManyRel.get_related_field() respect to_field.
2014-11-21 16:02:31 -05:00
Anssi Kääriäinen
5c481db295
Fixed #23605 -- Fixed nested subquery regression
...
Added relabeled_clone() method to sql.Query to fix the problem. It
manifested itself in rare cases where at least double nested subquery's
filter condition might target non-existing alias.
Thanks to Trac alias ris for reporting the problem.
2014-11-20 13:38:08 -05:00
Carl Meyer
d6e2bbe734
Fixed #23876 -- Removed dead code in SQLAggregateCompiler.
2014-11-20 04:18:08 -07:00
Carl Meyer
e7b9a58b08
Fixed #21794 -- Removed deprecation warning for abstract models outside an app.
2014-11-19 15:56:04 -07:00
Carl Meyer
08fbbaa45b
Deprecated calling a SQLCompiler instance.
2014-11-18 19:47:16 -07:00
Anssi Kääriäinen
4252a14c39
Moved bilateral transform fetching to models.lookups
2014-11-17 18:04:08 +01:00
Karen Tracey
dec93d8991
Fixed #21612 -- Made QuerySet.update() respect to_field
2014-11-16 15:44:13 +01:00
Josh Smeaton
f61256da3a
Renamed qn to compiler
2014-11-16 13:19:34 +01:00
Josh Smeaton
f59fd15c49
Fixed #14030 -- Allowed annotations to accept all expressions
2014-11-15 14:00:43 +00:00
Tim Graham
aa77e90aa9
Remove Field.get_validator_unique_lookup_type()
...
Usage of this method was removed pre 1.0 (c2ba59fc
).
2014-11-12 20:11:40 +01:00
Anssi Kääriäinen
4e9a6c94e6
Removed extra enumerate() from Query.setup_joins()
2014-11-12 13:22:08 +02:00