Implicit mapping would imply that if an API field has the same name than a model field, thus the API field value should be assigned to the model field. It could ease the code maintenance and automatically adapt to the creation of new fields in further Geotrek-admin/API v2 versions.
This functioning should be explained in code comments.
Fields that have the exact same name in the API results and in Geotrek models are explicitely declared for now, in
env.py
:Implicit mapping would imply that if an API field has the same name than a model field, thus the API field value should be assigned to the model field. It could ease the code maintenance and automatically adapt to the creation of new fields in further Geotrek-admin/API v2 versions.
This functioning should be explained in code comments.