Chitrank-Dixit / django-fcm

Django FCM provides firebase cloud messaging to android or ios support for django apps
https://django-fcm.readthedocs.io/en/latest/
MIT License
54 stars 28 forks source link

Extend Device model with no issues #40

Closed jwjimmy closed 6 years ago

jwjimmy commented 7 years ago

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 and DeviceAdmin dynamic, adapting to whichever model is used for FCM_DEVICE_MODEL.