| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
reverse side of a related set.
|
|
|
|
|
|
| |
relations of a parent class.
Fixed in c9a96075fa02b6d52bec748ffdfb413688a15774.
|
|
|
|
|
|
| |
to child models.
Fixed in 97774429aeb54df4c09895c07cd1b09e70201f7d.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
check to Model.save()
This mostly reverts 5643a3b51be338196d0b292d5626ad43648448d3 and
81e1a35c364e5353d2bf99368ad30a4184fbb653.
Thanks Carl Meyer for review.
|
|
|
|
|
|
| |
1 query where possible.
Thanks Loic Bistuer for review.
|
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
| |
|
| |
|
|
|
|
|
|
| |
descriptors' __set__ use it.
Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
|
|
|
|
|
|
| |
This finsishes the work started on #16803.
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
|
|
|
|
|
|
|
| |
retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
| |
|
|
|
|
|
|
|
|
| |
manager
Added update_or_create to RelatedManager, ManyRelatedManager and
GenericRelatedObjectManager.
Added missing get_or_create to GenericRelatedObjectManager.
|
|
|
|
|
|
| |
packages.
This is a reliqua from the early days of the modeltests/regressiontests era.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error message
Generic Foreign Keys can't be used as lhs in lookups for historical
reasons. Django 1.6 gave a FieldDoesNotExist exception when using GFKs
as lhs in lookups, but due to regression caused by lookup refactor patch
(20bab2cf9d02a5c6477d8aac066a635986e0d3f3) the exception type was
changed to AttributeError.
It might be a good idea to add support for gfk__exact and gfk__in lookups
later on.
Thanks to glicerinu@gmail.com for the report. The code in this commit
was written by Tim Graham.
|
|
|
|
| |
several tests; refs #18586.
|
|
|
|
|
|
|
|
|
|
|
|
| |
relation assignments.
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
followed by an `add()`, `clear()` could potentially affect the value of the
assigned queryset before the `add()` step; pre-evaluating it solves the problem.
This patch fixes the issue for ForeignRelatedObjectsDescriptor,
ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
|
|
|
|
|
|
|
|
|
|
|
| |
reverse lookups
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.
Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
|
|
|
|
|
|
|
| |
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.
Thanks to Ramiro, Carl and Loïc for the review.
|
|
|
|
| |
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Thanks SamBull for the report.
|
|
|
|
| |
signals to abstract senders.
|
|
|
|
|
|
| |
use form's save() method
Thanks mattaustin for the report and Pablo Recio (pyriku) for the patch.
|
|
|
|
|
|
| |
refs #20429
Thanks Simon Charette for the report and review.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
BaseGenericInlineFormSet
Thanks Fak3 for the suggestion.
|
|
|
|
|
|
|
|
|
|
|
| |
`GenericForeignKey`.
Allows a `GenericForeignKey` to reference proxy models. The default
for `for_concrete_model` is `True` to keep backwards compatibility.
Also added the analog `for_concrete_model` kwarg to
`generic_inlineformset_factory` to provide an API at the form level.
|
|
|
|
| |
Gives much nicer errors when it fails.
|
|
|
|
|
| |
Added a test, the issue was already fixed (likely by the patch
for #19385).
|
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
| |
the methods that return a QuerySet.
|
|
|