                  return format_html("<input type='hidden' name='csrfmiddlewaretoken' value='{0}' />", csrf_token)
          else:
              # It's very probable that the token is missing because of
              # misconfiguration, so we raise a warning
              from django.conf import settings
              if settings.DEBUG:
                  warnings.warn("A {% csrf_token %} was used in a template, but the context did not provide the value.  This is usually caused by not using RequestContext.")
              return ''
  
  class CycleNode(Node):
 
</s> remove             backend_cls = import_by_path(backend)
 </s> add             import_by_path(backend) </s> remove         from django.conf import settings

 </s> add  </s> remove         err = self.errors
 </s> add         # This triggers a full clean.
        self.errors </s> remove     def test_invalid_key_backslash(self):
        # This key should be refused and a new session should be created
        self.assertTrue(self.backend("a\\b\\c").load())

 </s> add  </s> remove                 except ImproperlyConfigured as e:
 </s> add                 except ImproperlyConfigured:
                  return format_html("<input type='hidden' name='csrfmiddlewaretoken' value='{0}' />", csrf_token)
          else:
              # It's very probable that the token is missing because of
              # misconfiguration, so we raise a warning

              if settings.DEBUG:
                  warnings.warn("A {% csrf_token %} was used in a template, but the context did not provide the value.  This is usually caused by not using RequestContext.")
              return ''
  
  class CycleNode(Node):
keep keep keep keep replace keep keep keep keep keep
 Fixed a number of flake8 errors -- particularly around unused imports and local variables 
django/template/defaulttags.py