Greetings everyone,
I have these nested serializers, in which the fields are not appropriately maped to html form fields in default browsable API page of django rest_framework, I have customized the representation of the response, and now I want to map those values to the appropriate HTML form fields
Below is my `serializer`
``` python
from rest_framework_gis import serializers as gis_serializers
from rest_framework import serializers
class NestedtLocationSerializer(gis_serializers.GeoFeatureModelSerializer):
class Meta:
model = Location
geo_field = 'geometry'
fields = (
'type',
'is_mobile',
'name',
'address',
'geometry',
)
class NestedFloorplanSerializer(serializers.ModelSerializer):
class Meta:
model = FloorPlan
fields = (
'floor',
'image',
)
class DeviceLocationSerializer(serializers.ModelSerializer):
location = NestedtLocationSerializer()
floorplan = NestedFloorplanSerializer(required=False, allow_null=True)
class Meta:
model = DeviceLocation
fields = (
'location',
'floorplan',
'indoor',
)
```
with the above serilaizers, I am getting this:-
Response:-
But in the html form fields the values of `is_mobile`, `type`, `name` are not loading in the html form fields, (probably because the representation of the data has been customized):-
Is there any way, I can control the default mapping of these values to appropriate serializer fields to fill the values in the form in the django-rest-framework browsable page??