Django-Rest-Framework 3.0 Field name ” is not valid for model `ModelBase`

The issue happens under urls.py‘s ‘fields’. Make sure that the fields in your serializer match exactly (case sensitive) to the field in your models.py.

### urls.py    
#...
# Serializers define the API representation
class CallTraceAttemptsSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = CallTraceAttempts
        fields = ('calltraceattemptid', 'datecreated')   ### Issue was right here, earlier version had 'Datecreated'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)