summaryrefslogtreecommitdiff
path: root/django/db/models/fields
AgeCommit message (Collapse)Author
2015-09-01Removed obsolete TODO about moving CommaSeparatedIntegerField into contrib.Tim Graham
2015-09-01Fixed #25320 -- Reverted ManyToManyField.null to False for backwards ↵Tim Graham
compatibility. Thanks Tom Christie for the report and review.
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-27Fixed #24201 -- Added order_with_respect_to support to GenericForeignKey.Alex Hill
2015-08-27Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann
Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
2015-08-12Fixed #25172 -- Fixed check framework to work with multiple databases.Ion Scerbatiuc
2015-08-10Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()Tim Graham
This mostly reverts 5643a3b51be338196d0b292d5626ad43648448d3 and 81e1a35c364e5353d2bf99368ad30a4184fbb653. Thanks Carl Meyer for review.
2015-08-03Removed unused Field.get_flatchoices() method.Tim Graham
Unused since c2ba59fc1da5287d6286e2c2aca4083d5bafe056 (Django 1.0). Thanks Andy Baker for the report.
2015-07-28Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.Tim Graham
Thanks Loic Bistuer for review.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-07-17Fixed #16501 -- Added an allow_unicode parameter to SlugField.Edward Henderson
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-14Fixed #24716 -- Deprecated Field._get_val_from_obj()Thomas Stephenson
The method duplicates the functionality of Field.value_from_object() and has the additional downside of being a privately named public API method.
2015-06-29Fixed #23791 -- Corrected object type check for pk__in=qsAnssi Kääriäinen
When the pk was a relation field, qs.filter(pk__in=qs) didn't work. In addition, fixed Restaurant.objects.filter(place=restaurant_instance), where place is an OneToOneField and the primary key of Restaurant. A big thank you to Josh for review and to Tim for review and cosmetic edits. Thanks to Beauhurst for commissioning the work on this ticket.
2015-06-27Sorted imports in __init__.py files.Tim Graham
2015-06-26Fixed #25016 -- Reallowed non-ASCII values for ForeignKey.related_name on ↵薛丞宏
Python 3.
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-15Fixed #24979 -- Removed usage of inspect.getargspec().Tim Graham
2015-06-15Removed django.utils.functional.total_ordering()Tim Graham
2015-06-15Fixed #24912 -- Fixed prefetch_related failure for UUIDField primary keysBrian King
This resolves a problem on databases besides PostgreSQL when using prefetch_related with a source model that uses a UUID primary key.
2015-06-06Fixed #24859 -- Made QuerySet.get() with UUIDField raise TypeError on bad value.Cole Maclean
For consistency with AutoField.
2015-06-04Fixed #22316 -- Added time filters to TimeField on SQLite.Matthew Somerville
This was implemented for non-SQLite backends in 1.7 (as a side effect of #16187).
2015-06-04Fixed #24677 -- Made TextField.to_python() return a string.Rolo
This is consistent with CharField.
2015-06-02Fixed #24831 -- Fixed pickling queryset with prefetch_related() after ↵Andriy Sokolovskiy
deleting objects.
2015-06-02Fixed #9596 -- Added date transform for DateTimeField.Jon Dufresne
2015-05-19Fixed #24818 -- Prevented models.CharField from accepting a string as max_lengthAlasdair Nicol
2015-05-17Renamed value_to_db_xxx to adapt_xxxfield_value.Aymeric Augustin
This mirrors convert_xxxfield_value nicely, taking advantage of the adapter/converter terminology which is commonly used by DB-API modules.
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-05-12Fixed #24105 -- Called Storage.get_valid_name() when upload_to is callableAbhaya Agarwal
2015-05-12Fixed #24156 -- Fixed inherited related name of ManyToManyField.Andriy Sokolovskiy
Fixed situation when parent abstract model declares related_name='+', and child models had an invalid queryset.
2015-05-11Removed redundant removal of hyphens in UUIDField.Matt Robenolt
2015-05-06Fixed #24708 -- Handled non-string values in GenericIPAddressField.to_python()Pradeek
2015-04-20Fixed #22394 -- Refactored built-in datetime lookups to transforms.Jon Dufresne
2015-03-26Fixed #24505 -- Fixed clash with hidden m2m fields.Marco Fucci
Added support for multiple m2m fields with the same 'to' model and with related_name set to '+'.
2015-03-25Fixed #24215 -- Refactored lazy model operationsAlex Hill
This adds a new method, Apps.lazy_model_operation(), and a helper function, lazy_related_operation(), which together supersede add_lazy_relation() and make lazy model operations the responsibility of the App registry. This system no longer uses the class_prepared signal.
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-03-25Renamed ForeignObject.related_field to target_fieldAnssi Kääriäinen
2015-03-25Removed field.field check in setup_joins()Anssi Kääriäinen
2015-03-25Refs #24267 -- Implemented lookups for related fieldsAnssi Kääriäinen
Previously related fields didn't implement get_lookup, instead related fields were treated specially. This commit removed some of the special handling. In particular, related fields return Lookup instances now, too. Other notable changes in this commit is removal of support for annotations in names_to_path().
2015-03-24Fixed #24483 -- Prevented keepdb from breaking with generator choices.David Szotten
If Field.choices is provided as an iterator, consume it in __init__ instead of using itertools.tee (which ends up holding everything in memory anyway). Fixes a bug where deconstruct() was consuming the iterator but bypassing the call to `tee`.
2015-03-23Fixed #23697 -- Improved ForeignObject.get_lookup_constraint() error message.Michael Blatherwick
2015-03-18Fixed #24495 -- Allowed unsaved model instance assignment check to be bypassed.Karl Hobley
2015-02-23Fixed #24381 -- removed ForeignObjectRel opts and to_optsAnssi Kääriäinen
These cached properies were causing problems with pickling, and in addition they were confusingly defined: field.rel.model._meta was not the same as field.rel.opts. Instead users should use field.rel.related_model._meta inplace of field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.
2015-02-21Fixed #24376 -- added verbose_name arg to UUIDFieldMichael Angeletti
2015-02-20Fixed typo in django/db/models/fields/files.py comment.Don Kirkby
2015-02-20Update converters to take a consistent set of parameters.Marc Tamlyn
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions.
2015-02-20Fixed #24343 -- Ensure db converters are used for foreign keys.Marc Tamlyn
Joint effort between myself, Josh, Anssi and Shai.
2015-02-16Reworked docstrings and comments in related.py.Loic Bistuer
Thanks Tim Graham for the review.
2015-02-16Merged ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptorLoic Bistuer
and made all "many" related objects descriptors inherit from ForeignRelatedObjectsDescriptor.
2015-02-14Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.Loic Bistuer
Thanks Carl Meyer and Tim Graham for the reviews and to all involved in the discussion.
2015-02-13Fixed #24319 -- Added validation for UUID model fieldJosh Smeaton