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

issue with 'modified_date' filed which is not an attribute of 'DeviceAdmin'. #20

Closed hibernatedguy closed 7 years ago

hibernatedguy commented 7 years ago

SystemCheckError :

<class 'fcm.admin.DeviceAdmin'>: (admin.E108) The value of 'list_display[2]' refers to 'modified_date', 
which is not a callable, an attribute of 'DeviceAdmin', or an attribute or method on 'fcm.Device'.

<class 'fcm.admin.DeviceAdmin'>: (admin.E127) 
The value of 'date_hierarchy' refers to 'modified_date', which is not an attribute of 'fcm.Device'.
hibernatedguy commented 7 years ago

It would be great if we capture created and modified timestamp for a Device.

from django.utils.translation import ugettext_lazy as _
class AbstractDevice(models.Model):
    # other fields goes here.
    creation_date = models.DateTimeField(verbose_name=_("Creation date"), auto_now_add=True)
    modified_date = models.DateTimeField(verbose_name=_("Modified date"), auto_now=True)
nipungarg59 commented 7 years ago

I got the same error while setting it up, so what should i do to resolve the error?

arjuntheprogrammer commented 7 years ago

check my pr #26