When you extend the Device model, the fields of the corresponding DeviceSerializer remain static, not reflecting those of the custom FCM_DEVICE_MODEL. This causes errors when attempting to register a new device, since any added fields are not passed to Device.
The changes in this PR make the fields of DeviceSerializer and DeviceAdmin dynamic, adapting to whichever model is used for FCM_DEVICE_MODEL.
This addresses the following issue: https://github.com/Chitrank-Dixit/django-fcm/issues/27
When you extend the Device model, the fields of the corresponding DeviceSerializer remain static, not reflecting those of the custom
FCM_DEVICE_MODEL
. This causes errors when attempting to register a new device, since any added fields are not passed to Device.The changes in this PR make the fields of
DeviceSerializer
andDeviceAdmin
dynamic, adapting to whichever model is used forFCM_DEVICE_MODEL
.