  if hasattr(models, 'IPAddressField'):
      ModelSerializer.serializer_field_mapping[models.IPAddressField] = IPAddressField
  
  if postgres_fields:
      class CharMappingField(DictField):
          child = CharField(allow_blank=True)
  
      ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField
      ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField
      ModelSerializer.serializer_field_mapping[postgres_fields.JSONField] = JSONField
  
  
  class HyperlinkedModelSerializer(ModelSerializer):
 
</s> remove from rest_framework.compat import unicode_repr
 </s> add from rest_framework.compat import postgres_fields, unicode_repr </s> remove     HiddenField, IPAddressField, ImageField, IntegerField, JSONField, ListField,
    ModelField, MultipleChoiceField, NullBooleanField, ReadOnlyField, RegexField,
    SerializerMethodField, SlugField, TimeField, URLField, UUIDField,
 </s> add     HiddenField, HStoreField, IPAddressField, ImageField, IntegerField, JSONField,
    ListField, ModelField, MultipleChoiceField, NullBooleanField, ReadOnlyField,
    RegexField, SerializerMethodField, SlugField, TimeField, URLField, UUIDField,
    ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField
  if hasattr(models, 'IPAddressField'):
      ModelSerializer.serializer_field_mapping[models.IPAddressField] = IPAddressField
  
  if postgres_fields:
    ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField
    ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField
    ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField
    ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField
      ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField
      ModelSerializer.serializer_field_mapping[postgres_fields.JSONField] = JSONField
  
  
  class HyperlinkedModelSerializer(ModelSerializer):
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Add HStoreField, postgres fields tests (#5654)

* Test postgres field mapping

* Add HStoreField

* Ensure 'HStoreField' child is a 'CharField'

* Add HStoreField docs 
rest_framework/serializers.py