Fix field mappings for 1.8 fields

This commit is contained in:
Tom Christie 2015-01-31 19:59:52 +00:00
parent 2cc4cb2465
commit e63f49bd1d

View File

@ -1330,13 +1330,13 @@ class ModelSerializer(Serializer):
if hasattr(models, 'UUIDField'): if hasattr(models, 'UUIDField'):
ModelSerializer._field_mapping[models.UUIDField] = UUIDField ModelSerializer.serializer_field_mapping[models.UUIDField] = UUIDField
if postgres_fields: if postgres_fields:
class CharMappingField(DictField): class CharMappingField(DictField):
child = CharField() child = CharField()
ModelSerializer._field_mapping[postgres_fields.HStoreField] = CharMappingField ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField
class HyperlinkedModelSerializer(ModelSerializer): class HyperlinkedModelSerializer(ModelSerializer):