          self.get_template = django.template.loader.get_template
  
          def get_template(template_name, dirs=None):
              if template_name == 'example.html':
                  return Template("example: {{ object }}")
              raise TemplateDoesNotExist(template_name)
  
          def select_template(template_name_list, dirs=None, using=None):
              if template_name_list == ['example.html']:
                  return Template("example: {{ object }}")
 
</s> remove                 return Template("example: {{ object }}")
 </s> add                 return engines['django'].from_string("example: {{ object }}") </s> remove                 return Template("404: {{ detail }}")
 </s> add                 return engines['django'].from_string("404: {{ detail }}") </s> remove                 return Template("403: {{ detail }}")
 </s> add                 return engines['django'].from_string("403: {{ detail }}") </s> remove     def test_get_remote_field_with_old_django_version(self):
        class MockField(object):
            rel = 'example_rel'
        compat.django.VERSION = (1, 8)
        assert compat.get_remote_field(MockField(), default='default_value') == 'example_rel'
        assert compat.get_remote_field(object(), default='default_value') == 'default_value'

    def test_get_remote_field_with_new_django_version(self):
        class MockField(object):
            remote_field = 'example_remote_field'
        compat.django.VERSION = (1, 10)
        assert compat.get_remote_field(MockField(), default='default_value') == 'example_remote_field'
        assert compat.get_remote_field(object(), default='default_value') == 'default_value'

 </s> add  </s> remove     for manager_name, manager_instance in get_names_and_managers(opts):
 </s> add     names_and_managers = [
        (manager.name, manager)
        for manager
        in opts.managers
    ]
    for manager_name, manager_instance in names_and_managers:
                return engines['django'].from_string("example: {{ object }}")
          self.get_template = django.template.loader.get_template
  
          def get_template(template_name, dirs=None):
              if template_name == 'example.html':
                return engines['django'].from_string("example: {{ object }}")
              raise TemplateDoesNotExist(template_name)
  
          def select_template(template_name_list, dirs=None, using=None):
              if template_name_list == ['example.html']:
                  return Template("example: {{ object }}")
keep keep keep keep replace keep keep keep keep keep
 Remove Django 1.8 & 1.9 compatibility code (#5481)

* Identify code that needs to be pulled out of/removed from compat.py

* Extract modern code from get_names_and_managers in compat.py and remove compat code

* Extract modern code from is_authenticated() in compat.py and remove.

* Extract modern code from is_anonymous() in compat.py and remove

* Extract modern code from get_related_model() from compat.py and remove

* Extract modern code from value_from_object() in compat.py and remove

* Update postgres compat

JSONField now always available.

* Remove DecimalValidator compat

* Remove get_remote_field compat

* Remove template_render compat

Plus isort.

* Remove set_many compat

* Remove include compat 
tests/test_htmlrenderer.py