Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/db/models/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #18012 -- Removed the now unused proxied_children ↵Simon Charette2015-10-121-1/+0
| | | | | | model option. Thanks to Tim for the review.
* Fixed #25296 -- Prevented model related object cache ↵Raphael Merx2015-09-201-0/+3
| | | | pollution when create() fails due to an unsaved object.
* Fixed #24201 -- Added order_with_respect_to support to ↵Alex Hill2015-08-271-28/+32
| | | | GenericForeignKey.
* Fixed #14217 -- Added validation for field name ↵sarthakmeh2015-08-251-1/+7
| | | | collision when using model inheritance.
* Fixed #25160 -- Moved unsaved model instance data loss ↵Tim Graham2015-08-101-0/+24
| | | | | | | | | check to Model.save() This mostly reverts 5643a3b51be338196d0b292d5626ad43648448d3 and 81e1a35c364e5353d2bf99368ad30a4184fbb653. Thanks Carl Meyer for review.
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-3/+8
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #16891 -- Made Model/QuerySet.delete() return the ↵Alexander Sosnovskiy2015-05-221-1/+1
| | | | number of deleted objects.
* Fixed #24693 -- Added label and label_lower property to ↵Luis Del Giudice2015-05-021-7/+2
| | | | Model._meta
* Fixed #24578 -- Fixed crash with QuerySet.update() on FK ↵Tim Graham2015-04-091-1/+1
| | | | | | to O2O fields. Thanks Anssi Kääriäinen for review.
* Fixed #24215 -- Refactored lazy model operationsAlex Hill2015-03-251-12/+11
| | | | | | | 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.
* Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen2015-03-251-16/+16
| | | | | | | | 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.
* Renamed ForeignObject.related_field to target_fieldAnssi Kääriäinen2015-03-251-2/+2
|
* Fixed #24479 -- Added system check to prevent both ↵Jon Dufresne2015-03-211-4/+11
| | | | ordering and order_wrt.
* Fixed #15579 -- Added ability to delete only child ↵Andriy Sokolovskiy2015-03-171-2/+2
| | | | models in multi-table inheritance.
* Fixed #24418 -- Prevented crash in refresh_from_db with ↵Claude Paroz2015-02-271-1/+1
| | | | | | | null fk Thanks Johannes Lerch for the report, Tim Graham for the test case, and Simon Charette for the review.
* Fixed #24328 -- cleaned up Options._get_fields() ↵Anssi Kääriäinen2015-02-201-1/+2
| | | | implementation
* Fixed #24351, #24346 -- Changed the signature of ↵Loic Bistuer2015-02-201-1/+1
| | | | | | | | | | | | | | | | allow_migrate(). The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
* Disallowed importing concrete models without an application.Aymeric Augustin2015-02-101-35/+9
| | | | | | Removed fragile algorithm to find which application a model belongs to. Fixed #21680, #21719. Refs #21794.
* Removed unnecessary parentheses in model check messages.Tim Graham2015-02-091-16/+20
|
* Fixed #24249 -- Improved field shadowing validation in ↵Aron Podrigal2015-02-091-1/+1
| | | | model multi-inheritance.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-9/+16
|
* Fixed #15321 -- Honored ancestors unique checks.Aron Podrigal2015-02-041-2/+2
| | | | Thanks to Tim for the review.
* Fixed #23617 -- Added get_pk_value_on_save()Anssi Kääriäinen2015-02-031-0/+3
| | | | | | | | The method is mainly intended for use with UUIDField. For UUIDField we want to call the field's default even when primary key value is explicitly set to None to match the behavior of AutoField. Thanks to Marc Tamlyn and Tim Graham for review.
* Advanced deprecation warnings for Django 1.9.Tim Graham2015-01-191-2/+1
|
* Fixed #12663 -- Formalized the Model._meta API for ↵Daniel Pyrathon2015-01-071-31/+38
| | | | | | | retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Fixed #9104 -- Moved FieldDoesNotExist to core.exceptionsDaniel Pyrathon2015-01-021-5/+3
|
* Fixed #24007 -- Ensure apps registry's ready before ↵Claude Paroz2014-12-171-0/+2
| | | | | | | unpickling models This prevents AppRegistryNotReady errors when unpickling Django models from an external script.
* Changed internal storing of abstract and concrete ↵Markus Holtermann2014-12-151-2/+1
| | | | | | | managers to be in a single list. This commit prepares the internal manager layout to be serialized by migrations; refs #23822.
* Fixed #901 -- Added Model.refresh_from_db() methodAnssi Kääriäinen2014-11-281-1/+67
| | | | | Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham for reviews.
* Fixed #21794 -- Removed deprecation warning for abstract ↵Carl Meyer2014-11-191-6/+4
| | | | models outside an app.
* Fixed #21612 -- Made QuerySet.update() respect to_fieldKaren Tracey2014-11-161-2/+2
|
* Fixed #22967 -- Made Model._do_update consistentJozef Knaperek2014-11-121-2/+8
| | | | | | Made _do_update behave more strictly according to its docs, including a corner case when specific concurent updates are executed and select_on_save is set.
* Fixed #11775 -- Made ABSOLUTE_URL_OVERRIDES work with ↵Tim Graham2014-09-091-14/+5
| | | | | | | models that don't define get_absolute_url(). Thanks jukvalim for the report and initial patch, and Preston Timmons for review.
* Limited lines to 119 characters in django/Tim Graham2014-09-051-6/+20
| | | | refs #23395.
* Fixed name of database connection featureShai Berger2014-07-141-1/+1
|
* Fixed #19501 -- added Model.from_db() methodAnssi Kääriäinen2014-07-011-0/+10
| | | | | | | | | The Model.from_db() is intended to be used in cases where customization of model loading is needed. Reasons can be performance, or adding custom behavior to the model (for example "dirty field tracking" to issue automatic update_fields when saving models). A big thank you to Tim Graham for the review!
* Fixed problem introduced with #refs 13711.Anubhav Joshi2014-06-231-1/+1
|
* Fixed #13711 -- Model check added to ensure that ↵Anubhav Joshi2014-06-171-1/+72
| | | | | | auto-generated column name is within limits of the database. Thanks russellm for report and Tim Graham for review.
* Fixed #21430 -- Added a RuntimeWarning when unpickling ↵Anubhav Joshi2014-06-111-1/+20
| | | | | | | Models and QuerySets from a different Django version. Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch, and akaariai, loic, and charettes for helping in shaping the patch.
* Fixed #22690 -- Added a check for proxy models ↵Craig de Stigter2014-06-021-3/+16
| | | | | | containing fields. Removed the FieldError raised by ModelBase.__new__ in this case.
* Fixed #22711 -- Adjusted ordering checks to allow ↵Vincent-Vega2014-06-011-1/+9
| | | | | | implicit relation fields. refs #19195.
* Fixed typo.Tim Graham2014-05-161-1/+1
|
* Fixed #18389 -- Fixed the way contribute_to_class is calledVlad Starostin2014-05-161-1/+3
| | | | | Now this method is only called only if the object is an instance. This allows to have field classes as model class attributes.
* Fixed #22539 -- Copied exclude argument in ↵Yehonatan Daniv2014-05-011-0/+2
| | | | Model.full_clean() to prevent side effects.
* Use the new implementation of `six.with_metaclass`.Simon Charette2014-04-291-11/+1
| | | | | | No more `NewBase` horrors. Thanks to bendavis78 for his work on merging this into six.
* Appeased flake8 2.1.0.Aymeric Augustin2014-04-211-1/+1
|
* Fixed #22356 -- Added a check to make sure ↵Marc Egli2014-04-141-0/+13
| | | | unique_together fields are local.
* Fixed #22236 -- Removed inappropriate usage of signalsClaude Paroz2014-04-051-5/+6
| | | | Thanks Aymeric Augustin for the report and Tim Graham for the review.
* Removed legacy transaction management per the ↵Aymeric Augustin2014-03-211-2/+2
| | | | deprecation timeline.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-4/+5
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.