Support validating cache backends on Django 1.6 and 1.11.
Review Request #10506 — Created April 3, 2019 and submitted
This adds support for validating the cache backend in the General
Settings page on Django 1.11. We no longer have access to
which was present on Django 1.6, so we now duplicate the functionality
by importing the backend manually and then constructing an instance of
In order to test this on Django 1.11, a change needed to be made to the
cache field display logic for the form. Modern versions set the
requiredattribute on required fields, which meant that the form
couldn't be submitted due to the hidden fields for other backends. We
now dynamically set the
requiredfield based on the current backend
and the presence of a
requiredCSS class on the label (which is
available on both).
Tested the form on Django 1.6 and 1.11. Checked for both validation
failures and successful validation.