summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2015-01-19Removed IPAddressField per deprecation timeline; refs #20439.Tim Graham
2015-01-19Removed legacy ORM lookup support per deprecation timeline; refs #16187.Tim Graham
2015-01-19Fixed #24174 -- Fixed extra order by descendingJosh Smeaton
2015-01-18Removed support for callable QuerySet arguments per deprecation timeline; ↵Tim Graham
refs #11629.
2015-01-17Removed deprecated aliases in django.db.models.Tim Graham
2015-01-17Removed pre_syncdb and post_syncdb signals per deprecation timeline.Tim Graham
2015-01-17Removed django.db.models.loading per deprecation timeline.Tim Graham
2015-01-16Fixed #24092 -- Widened base field support for ArrayField.Marc Tamlyn
Several issues resolved here, following from a report that a base_field of GenericIpAddressField was failing. We were using get_prep_value instead of get_db_prep_value in ArrayField which was bypassing any extra modifications to the value being made in the base field's get_db_prep_value. Changing this broke datetime support, so the postgres backend has gained the relevant operation methods to send dates/times/datetimes directly to the db backend instead of casting them to strings. Similarly, a new database feature has been added allowing the uuid to be passed directly to the backend, as we do with timedeltas. On the other side, psycopg2 expects an Inet() instance for IP address fields, so we add a value_to_db_ipaddress method to wrap the strings on postgres. We also have to manually add a database adapter to psycopg2, as we do not wish to use the built in adapter which would turn everything into Inet() instances. Thanks to smclenithan for the report.
2015-01-16Fixed #24146 -- Fixed a missing fields regression in admin checks.Collin Anderson
This allows using get_field() early in the app loading process. Thanks to PirosB3 and Tim Graham.
2015-01-15Replaced inner functions by class methods.Simon Charette
refs #24031 Thanks to Tim Graham and Michał Modzelewski for the review.
2015-01-14Fixed incorrect error message in Options.get_fields()Collin Anderson
2015-01-12Fixed #24031 -- Added CASE expressions to the ORM.Michał Modzelewski
2015-01-13Fixed #24060 -- Added OrderBy ExpressionsJosh Smeaton
2015-01-12Fixed #9893 -- Allowed using a field's max_length in the Storage.Pavel Shpilev
2015-01-10Move % addition to lookups, refactor postgres lookups.Marc Tamlyn
These refactorings making overriding some text based lookup names on other fields (specifically `contains`) much cleaner. It also removes a bunch of duplication in the contrib.postgres lookups.
2015-01-08Fixed #24020 -- Refactored SQL compiler to use expressionsAnssi Kääriäinen
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.
2015-01-08Simplified verbose_name_raw propertyClaude Paroz
2015-01-07Fixed null handling in Value expressionJosh Smeaton
2015-01-07Refs #2443 -- Allowed creation of objects with NULL DurationFieldsMichał Modzelewski
2015-01-07Fixed #24078 -- Removed empty strings from GenericIPAddressFieldJosh Smeaton
2015-01-06Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
2015-01-05Fixed #23861 -- Added an API to deprecate model fields.Tim Graham
Thanks Markus Holterman and Berker Peksag for review.
2015-01-05Renamed flag for detecting managers built from QuerySets with as_manager().Markus Holtermann
2015-01-02Fixed #9104 -- Moved FieldDoesNotExist to core.exceptionsDaniel Pyrathon
2015-01-01Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.Tim Graham
Thanks Markus Holtermann for review.
2014-12-31Fixed #23758 -- Allowed more than 5 levels of subqueriesPiotr Pawlaczek
Refactored bump_prefix() to avoid infinite loop and allow more than than 5 subquires by extending the alphabet to use multi-letters.
2014-12-31Moved DatabaseCreation.data_types properties to DatabaseWrapper.Tim Graham
refs #22340.
2014-12-29Fixed #23753 -- Oracle failure with CoalesceJosh Smeaton
2014-12-27Fixed #23753 -- Added a suite of SQL FunctionsJosh Smeaton
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-24Fixed #10414 -- Made select_related() fail on invalid field names.Niclas Olofsson
2014-12-23Removed models.Field.bind() -- unused/undocumented since at least 1.0.Tim Graham
2014-12-23Fixed #21414 -- Removed RelatedObject and deprecated Field.related.Anssi Kääriäinen
2014-12-23Refs #2443 -- Move the durationfield converter logic.Marc Tamlyn
This reduces how frequently this logic is run significantly. Thanks to Anssi for the suggestion.
2014-12-23Fixed #24033 -- Use interval type on Oracle.Marc Tamlyn
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-20Fixed #2443 -- Added DurationField.Marc Tamlyn
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-18Refs #24020 -- return expressions from get_group_by_cols()Anssi Kääriäinen
2014-12-17Fixed #24007 -- Ensure apps registry's ready before unpickling modelsClaude Paroz
This prevents AppRegistryNotReady errors when unpickling Django models from an external script.
2014-12-15Fixed #23822 -- Added support for serializing model managers in migrationMarkus Holtermann
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin, Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15Changed internal storing of abstract and concrete managers to be in a single ↵Markus Holtermann
list. This commit prepares the internal manager layout to be serialized by migrations; refs #23822.
2014-12-13Fixed #23812 -- Changed django.utils.six.moves.xrange imports to rangeMichael Hall
2014-12-12Fixed #23455 -- Accept either bytes or text for related_name, convert to text.Carl Meyer
2014-12-12Revert "Fixed #23455 -- Forced related_name to be a unicode string during ↵Carl Meyer
deconstruction." This reverts commit 45bd7b3bd9008941580c100b9fc7361e3ff3ff0d.
2014-12-12Fixed #23941 -- Removed implicit decimal formatting from expressions.Josh Smeaton
2014-12-09Remove text-mangling of default values.Marc Tamlyn
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-11-28Fixed #23853 -- Added Join class to replace JoinInfoAnssi Kääriäinen
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-28Fixed #901 -- Added Model.refresh_from_db() methodAnssi Kääriäinen
Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham for reviews.
2014-11-28Fixed #16731 -- Made pattern lookups work properly with F() expressionsThomas Chaumeny
2014-11-27Fixed #23338 -- Added warning when unique=True on ForeigKeyDiego Guimarães
Thanks Jonathan Lindén for the initial patch, and Tim Graham and Gabe Jackson for the suggestions.
2014-11-27Fixed #23877 -- aggregation's subquery missed target colAnssi Kääriäinen
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.