| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
reverse side of a related set.
|
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
| |
|
|
|
|
| |
Thanks to Tim for the review.
|
|
|
|
|
|
|
| |
deprecation timeline.
Kept support for creating models without migrations when running tests
(especially for Django's test suite).
|
|
|
|
| |
model_inheritance.ModelInheritanceTest
|
|
|
|
| |
Each TestCase is also now wrapped in a class-wide transaction.
|
| |
|
|
|
|
| |
inherited models.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The model_inheritance_same_model_name tests couldn't be run without the
model_inheritance tests. Make the problem go away by merging them.
Thanks timo for the report.
|
|
|
|
| |
Thanks Anssi Kääriäinen for the suggestion.
|
|
|
|
| |
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
An isnull lookup produced incorrect SQL. This was already fixed
earlier, so only tests added.
|
|
|
|
| |
Fixed #11892, fixed #16458, fixed #14492.
|
|
|
|
|
|
|
| |
BooleanField does not have a default value
Thanks to Collin Anderson for the suggestion and Tim Graham for
reviewing the patch.
|
|
|
|
|
| |
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.
Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.
The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
_save_parents(self)
for each parent:
_save_parents(parent)
_save_table(parent)
_save_table(self)
|
| |
|
|
|
|
| |
constrained by an inner query.
|
|
|