| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Check that the foreign object `from_fields` are a subset of any unique
constraints on the foreign model.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old names were downright confusing. Some seemed to mean the opposite
of what the class actually did.
The new names follow a consistent nomenclature:
(Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor.
I mentioned combinations that do not exist in the docstring in order to
help people who would search for them in the code base.
|
| |
|
| |
|
| |
|
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Django test suite.
|
|
|
|
| |
Thanks Piotr Kasprzyk for help with the patch.
|
|
|
|
| |
bulk_create with ForeignObject.
|
| |
|
|
|
|
| |
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
|
| |
Also made some cleanup to build_filter() code by introducing submethods
solve_lookup_type() and prepare_lookup_value().
|
|
|
|
| |
Also PEP8 + python_2_unicode_compatible cleanup done.
|
| |
|
| |
|
|
|
|
|
| |
Thanks simon@ for the suggestion and JordanPowell
for the initial patch.
|
|
|
|
|
|
|
|
| |
'exclude', and added '__all__' shortcut
This also updates all dependent functionality, including modelform_factory
and modelformset_factory, and the generic views `ModelFormMixin`,
`CreateView` and `UpdateView` which gain a new `fields` attribute.
|
|
This patch iproved two major parts in Django. First, the fields.related
was refactored. The main addition there was ForeignObject. Second, the
ORM now handles multicolumn joins in most cases, though there are still
cases that do not work correcly (split_exclude() for example).
In addition there were extesive changes to how GenericRelation works.
Before it was a fake m2m field, now it is a pure virtual fields and is
based on ForeignObject.
There is still much room for improvement. The related fields code is
still somewhat confusing, and how fields are represented in model._meta
should also be revisited.
This patch was written mostly by Jeremy Tillman with some final polish
by the committer.
|