from map_service.models import LkState
from map_service.models import SpatialObjects
from rest_framework_mongoengine import serializers


class LkStateSerializer(serializers.DocumentSerializer):
    class Meta:
        model = LkState


class SpatialObjectsSerializer(serializers.DocumentSerializer):
    class Meta:
        model = SpatialObjects
        fields = '__all__'

from map_service.models import LkState
from map_service.models import SpatialObjects
from rest_framework_mongoengine import serializers


class LkStateSerializer(serializers.DocumentSerializer):
    class Meta:
        model = LkState
        fields = '__all__'

class SpatialObjectsSerializer(serializers.DocumentSerializer):
    class Meta:
        model = SpatialObjects
        fields = '__all__'

Fix Compatibility issue with django 1.8+
Fix Compatibility issue with django 1.8+

  from map_service.models import LkState
  from map_service.models import SpatialObjects
  from rest_framework_mongoengine import serializers
  
  
  class LkStateSerializer(serializers.DocumentSerializer):
      class Meta:
          model = LkState
- 
+         fields = '__all__'
  
  class SpatialObjectsSerializer(serializers.DocumentSerializer):
      class Meta:
          model = SpatialObjects
          fields = '__all__'
  
Fix Compatibility issue with django 1.8+
## Code Before:
from map_service.models import LkState
from map_service.models import SpatialObjects
from rest_framework_mongoengine import serializers


class LkStateSerializer(serializers.DocumentSerializer):
    class Meta:
        model = LkState


class SpatialObjectsSerializer(serializers.DocumentSerializer):
    class Meta:
        model = SpatialObjects
        fields = '__all__'

## Instruction:
Fix Compatibility issue with django 1.8+
## Code After:
from map_service.models import LkState
from map_service.models import SpatialObjects
from rest_framework_mongoengine import serializers


class LkStateSerializer(serializers.DocumentSerializer):
    class Meta:
        model = LkState
        fields = '__all__'

class SpatialObjectsSerializer(serializers.DocumentSerializer):
    class Meta:
        model = SpatialObjects
        fields = '__all__'
