      decimal_places = getattr(model_field, 'decimal_places', None)
      if decimal_places is not None:
          kwargs['decimal_places'] = decimal_places
  
      if isinstance(model_field, models.TextField) or (JSONField and isinstance(model_field, JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
 
</s> remove                 if not isinstance(validator, DecimalValidator)
 </s> add                 if not isinstance(validator, validators.DecimalValidator) </s> remove         # (In Django 1.9+ this differs from previous style)
        if isinstance(model_field, models.DecimalField) and DecimalValidator:
 </s> add         if isinstance(model_field, models.DecimalField): </s> remove            not is_authenticated(request.user) and self.authenticated_users_only):
 </s> add            not request.user.is_authenticated and self.authenticated_users_only): </s> remove                 (getattr(get_remote_field(relation.field), 'through', None) is not None) and
                not get_remote_field(relation.field).through._meta.auto_created
 </s> add                 (getattr(relation.field.remote_field, 'through', None) is not None) and
                not relation.field.remote_field.through._meta.auto_created </s> remove         rel = get_remote_field(self.model_field, default=None)
 </s> add         rel = self.model_field.remote_field
    if isinstance(model_field, models.TextField) or (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
      decimal_places = getattr(model_field, 'decimal_places', None)
      if decimal_places is not None:
          kwargs['decimal_places'] = decimal_places
  
    if isinstance(model_field, models.TextField) or (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
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 
rest_framework/utils/field_mapping.py