summaryrefslogtreecommitdiff
path: root/django/db/models/fields
AgeCommit message (Collapse)Author
2013-10-03Fixed #21216 -- Allow `OneToOneField` reverse accessor to be hidden.Simon Charette
2013-09-30Fixed #3871 -- Fixed regression introduced by 04a2a6b.Loic Bistuer
Added do_not_call_in_templates=True attribute to RelatedManagers to prevent them from being called. Thanks jbg@ for the report.
2013-09-30Fixed #13724: Corrected routing of write queries involving managers.Russell Keith-Magee
Previously, if a database request spanned a related object manager, the first manager encountered would cause a request to the router, and this would bind all subsequent queries to the same database returned by the router. Unfortunately, the first router query would be performed using a read request to the router, resulting in bad routing information being used if the subsequent query was actually a write. This change defers the call to the router until the final query is acutally made. It includes a small *BACKWARDS INCOMPATIBILITY* on an edge case - see the release notes for details. Thanks to Paul Collins (@paulcollinsiii) for the excellent debugging work and patch.
2013-09-28Fixed #20439 -- Started deprecation of IPAddressFieldErik Romijn
2013-09-25Fixed #3871 -- Custom managers when traversing reverse relations.Loic Bistuer
2013-09-18Fixed #12568 -- no error when accessing custom field's descriptorAnssi Kääriäinen
The SubfieldBase's descriptor caused an AttributeError when accessed from the class. Introspection didn't like that. Patch by Trac alias supervacuo.
2013-09-16Fixed #17627 -- Renamed util.py files to utils.pyTim Graham
Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
2013-09-07Negligible style fix.Aymeric Augustin
2013-09-06Fixed #10164 -- Made AutoField increase monotonically on SQLiteChris Wilson
Thanks malte for the report.
2013-08-30Fixed #20999 - Allow overriding formfield class with choices, without ↵Carl Meyer
subclass restrictions. Refs #18162. Thanks claudep and mjtamlyn for review.
2013-08-29Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()Tim Graham
Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
2013-08-29Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if ↵Tim Graham
prepared is False. Thanks homm for the report and Aramgutang and lrekucki for work on the patch.
2013-08-21Fixed #20946 -- model inheritance + m2m failureAnssi Kääriäinen
Cleaned up the internal implementation of m2m fields by removing related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing if asked for the foreign key value on foreign key to parent model's primary key when child model had different primary key field.
2013-08-21Fixed #20820 -- Model inheritance + m2m fixture loading regressionAnssi Kääriäinen
Tests by Tim Graham, report from jeroen.pulles@redslider.net.
2013-08-09Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/core/management/commands/flush.py django/core/management/commands/syncdb.py django/db/models/loading.py docs/internals/deprecation.txt docs/ref/django-admin.txt docs/releases/1.7.txt
2013-07-31Fixed #20649 -- Allowed blank field display to be defined in the initial ↵Alex Couper
list of choices.
2013-07-31Fixed #20348 -- Consistently handle Promise objects in model fields.Tai Lee
All Promise objects were passed to force_text() deep in ORM query code. Not only does this make it difficult or impossible for developers to prevent or alter this behaviour, but it is also wrong for non-text fields. This commit changes `Field.get_prep_value()` from a no-op to one that resolved Promise objects. All subclasses now call super() method first to ensure that they have a real value to work with.
2013-07-27Fixed a number of minor misspellings.Julien Phalip
2013-07-26Fixed related model lookup regressionAnssi Kääriäinen
It has been possible to use models of wrong type in related field lookups. For example pigs__in=[a_duck] has worked. Changes to ForeignObject broke that. It might be a good idea to restrict the model types usable in lookups. This should be done intentionally, not accidentally and without any consideration for deprecation path.
2013-07-23Fixed #20761 -- Reworded ForeignKey default error messageersran9
2013-07-23Minor change to get_extra_descriptor_filter()Anssi Kääriäinen
Refs #20611.
2013-07-22Merge branch 'master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/mysql/introspection.py django/db/backends/oracle/creation.py django/db/backends/postgresql_psycopg2/creation.py django/db/models/base.py django/db/models/loading.py
2013-07-14Fixed #20746 -- Removed Python 2.6 specific code/docsTim Graham
2013-07-12Fixed #20740 -- GenericIPAddressField should pass protocol to formfield()Tim Graham
Thanks Jeff250.
2013-07-08A large number of stylistic cleanups across django/db/Alex Gaynor
2013-07-02Merge branch 'master' into schema-alterationAndrew Godwin
2013-07-01Removed some conditional code only needed under Python 2.6.Aymeric Augustin
2013-06-30Removed a comment that wasn't adding a value.Alex Gaynor
In the intervening years, RelatedField has become less of a hack (though it still is one). Anyone who wants to can re-instate the comment, but please add more details.
2013-06-29Advanced deprecation warnings for Django 1.7.Aymeric Augustin
2013-06-29Fixed #20660 -- Do not try to delete an unset FieldFileClaude Paroz
Thanks stanislas.guerra at gmail.com for the report and Baptiste Mispelon for the review.
2013-06-28Fix Python 3 supportAndrew Godwin
2013-06-28Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/__init__.py django/db/models/fields/related.py tests/field_deconstruction/tests.py
2013-06-28Ported over Field.deconstruct() from my schema alteration branch.Andrew Godwin
This is to help other ongoing branches which would benefit from this functionality.
2013-06-27Add related_query_name to ForeignKey/M2M. Refs #20244Andrew Godwin
2013-06-22Remove EmailField max_length default removal in deconstruct()Andrew Godwin
2013-06-19Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/models/loading.py
2013-06-18Fixed #20199 -- Allow ModelForm fields to override error_messages from model ↵Loic Bistuer
fields
2013-06-18Refactored ValidationError to allow persisting error params and error codes ↵Loic Bistuer
as the exception bubbles up
2013-06-13Fixed #20594 -- Add validation to models.SlugField.Baptiste Mispelon
Thanks carbonXT for the report.
2013-06-07Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/models/fields/related.py
2013-06-01Fixed #20337 -- Clarified error message when database relation is not allowed.Dan Loewenherz
2013-05-27Fixed #17582 - Added message to DoesNotExist exceptions.Tim Graham
Thanks simon@ for the suggestion and JordanPowell for the initial patch.
2013-05-20Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField ↵Ramiro Morales
fields. This is backward incompatible for custom form field/widgets that rely on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select more than one.' sentence. Application that use standard model form fields and widgets aren't affected but need to start handling these help texts by themselves before Django 1.8. For more details, see the related release notes and deprecation timeline sections added with this commit.
2013-05-20Fixed #20378 -- regression in GenericRelation on abstract modelAnssi Kääriäinen
When a GenericRelation was defined on abstract model, queries on childs of the abstract model didn't work. The problem was in the way fields and in particular field.rel was copied from models to their children. The regression was likely caused by #19385. Thanks to Gavin Wahl for spotting the regression.
2013-05-18Add a deconstruct() method to Fields.Andrew Godwin
This allows the field's initial argument to be obtained so it can be serialised to, and re-created from, a textual format.
2013-05-18Merge branch 'master' into schema-alterationAndrew Godwin
2013-05-17Replaced an antiquated pattern.Aymeric Augustin
Thanks Lennart Regebro for pointing it out.
2013-05-10Merge branch 'master' into schema-alterationAndrew Godwin
2013-05-09Rest of the _meta.app_cache stuff. Schema tests work now.Andrew Godwin
2013-05-09Whoops. Need to be good and use six.Andrew Godwin