Thanks Tim Graham for review and Tai Lee for the additional test to prove
this was a regression in 1.6.
Backport of 7f2485b4d1 and 8137215973 from master
Also moved accessor method get_redirect_url next to its attribute url
for consistency with the other views.
Thanks nikunj.sg for the report
Backport of 462edd22e5577ff9ee6477f7572b571700d1a2aa from master.
When using the `parsed` option, {% ssi %} has the same limitation
as {% include %}, namely that the rendering of the included
template is done separately.
Thanks to trac user nagyv for the report and to alextreme for
the patch.
Backport of 072fb923e1b2e39e85a4ed4569ee7cd94f26a0bb from master.
Due to a mixup between text and bytes, iteration over
a File instance was broken under Python 3.
Thanks to trac user pdewacht for the report and patch.
Backport of 3841feee86cae65165f120db7a5d80ffc76dd520 from master.
Before 4befb30 the detection was broken because we used isinstance
against a LazyObject rather than against a Storage class. That commit
fixed it by looking directly at the object wrapped by LazyObject.
This could however be a problem to anyone who subclasses the
collectstatic management Command and directly supplies a Storage class.
Refs #21581.
Backport of 7e27885c6e7588471fd94a4def16b7081577bdfc from master.
This reverts commit 2ee447fb5f8974b432d3dd421af9a242215aea44.
That commit introduced a regression (#21882) and didn't really
do what it was supposed to: while it did delay the evaluation
of lazy objects passed to mark_safe(), they weren't actually
marked as such so they could end up being escaped twice.
Refs #21882.
Backport of a878bf9b093bf15d751b070d132fec52a7523a47 from master.
Made sure Django treats case .filter(NOT (a AND b)) the same way as
.filter((NOT a OR NOT b)) for join promotion.
Heavily modified backpatch of 35cecb1ebd0ccda0be7a518d1b7273333d26fbae
from master.
Conflicts:
django/db/models/sql/query.py
tests/queries/tests.py
Backpatch of 9918c11114ac3ec9622631558ef26ebf3919cb69 from master.
Conflicts:
django/db/models/sql/compiler.py
tests/model_inheritance_regress/tests.py
Broke InspectDBTestCase.test_field_types in two:
- a test_number_field_types, which now passes on Oracle too
- a test_field_types, for all non-numeric fields, which is still expected to fail
Also made some pep8 fixes in the tests file. Refs #19884
Thanks Tim Graham for review.
Backport of e9d12ba from master
Clarified that queries in autocommit mode are committed immediately
only if a transaction has not already been started. Added to the
main transaction docs that Django's TestCase class implicitly wraps
its tests in transactions.
Backport of 798fd59f from master.
This is consistent with Python's official documentation
and it's a sphinx recommendation too[1].
[1] http://sphinx-doc.org/markup/desc.html#dir-method
Refs #21855.
Backport of 79e1d6ebd70898d514a44b85648e3d24104c4243 from master.