This PR should also be backported to 1.11 and 2.0.
If I understood everything correctly, I should create separate PRs for this, is it right?
Noticed whilst reading to review #7727. cached_property implements exactly the pattern that was in use.
The rest of the file verifies that override_settings is working, so why not use it?
Query.tables a tupleQuery.order_by a tupleQuery.group_by a tupleQuery.distinct_fields always a tuple (add_distinct_fields was already…Noticed it was missing during the mailing list discussion about flags. Learnt for myself that gettext_lazy support was added in django 1.4.
Piggy-backing off of work done in the closed PR #7363:
See https://code.djangoproject.com/ticket/27612 for details
The str method of HttpResponseRedirectBase depends on self._headers
being set, which happens in the initialization of the base class.
This would otherwise error when attempting to format a response that
was given unsafe redirect s…
If CSRF_USE_SESSIONS is used, there is no need to check that CSRF_COOKIE_SECURE is True.
(As requested by @timgraham in #5600)
This is copied from https://github.com/mozilla/django-csp
It's licensed under the MPL, but that's compatible with BSD https://www.mozilla.org/en-US/MPL/2.0/FAQ/#mpl-bsd-and-apache
pinging @jsocol from Mozilla
body.getAttribute('data-admin-utc-offset') call returns empty
string ("") or null if it isn't set. However, current call
checks the value for undefined which is a wrong check. Fixed
that faulty check.
https://code.djangoproject.com/ticket/25855
If one have migrations waiting to be applied, runserver command
gives a warning with check_migrations() method. Updated it with
more accurate messages. (Unapplied migrations count and list…
…
Refactored Django's built-in BaseCache.get_or_set() to
work well with DummyCache.
get_or_set implementation tries to fetch the key first.
If it doesn't exists, it adds the default value
(passed as 'default' parameter) to the c…
A field that can store a list of string values that validate against the "choices" parameter.
Documentation (ref and topic) on what happens when primary key is changed and saved.
The style is unclear and inconsistent about whether the settings are preferred to be lists or tuples. A discussion in the mailing list seems to indicate a consensus that lists are preferred, but backward compatibility may be a concern …