| Age | Commit message (Collapse) | Author |
|
<script> tags.
|
|
model instance.
Thanks Carlton Gibson for reviews.
|
|
|
|
Thanks Claude Paroz for assistance with translations.
|
|
|
|
html.escape()/unescape().
|
|
is passed.
|
|
|
|
Thanks Mariusz Felisiak for auditing.
|
|
|
|
|
|
|
|
|
|
unique_together validation.
|
|
COUNT is more expensive than EXISTS; use the latter when possible.
|
|
Instead of loading all QuerySet results in memory, count the number of
entries. This adds an extra query when list() or tuple() is called on the
choices (because both call __len__() then __iter__()) but uses less
memory since the QuerySet results won't be cached. In most cases, the
choices will only be iterated on, meaning that __len__() won't be called
and only one query will be executed.
|
|
|
|
|
|
When __len__() is called (e.g. when casting to list or tuple), the
QuerySet is evaluated and the result cache populated. iterator()
shouldn't be called on the QuerySet after that, as it would reset the
result cache and trigger a second query.
|
|
manager.
Removing all() in __iter__() prevents a duplicate query when choices are
cast to a list and there's a prefetch_related().
|
|
|
|
|
|
|
|
syntax.
|
|
Previously, it was a QuerySet which could reevaluate to a new value if the
model's data changes. This is inconsistent with other Field.value_from_object()
methods.
This allows reverting the fix in the admin for refs #27998.
|
|
|
|
|
|
field_for_model() now has an additional keyword argument,
apply_limit_choices_to, allowing it to continue to be used to create
form fields dynamically after ModelForm.__init__() is called.
Thanks Tim Graham for the review.
|
|
|
|
|
|
iter(dict) is equivalent to iter(dict.keys()).
|
|
|
|
Regression in 9153d8fbd6385db9f48793662de789fc3d686841.
|
|
|
|
queryset cache.
Thanks Luke Benstead for the report Simon Charettes for the fix.
|
|
|
|
|
|
widget rendering.
|
|
|
|
These functions do nothing on Python 3.
|
|
|
|
|
|
Thanks Tim Graham for the review.
|
|
Thanks Tim Graham and Simon Charette for the reviews.
|
|
|
|
|
|
|
|
non-empty first value.
|
|
Thanks Carl Meyer and Tim Graham for contributing to the patch.
|
|
|