jpadilla / django-rest-framework-jwt

JSON Web Token Authentication support for Django REST Framework
http://jpadilla.github.io/django-rest-framework-jwt/
MIT License
3.19k stars 650 forks source link

'module' object has no attribute 'JSONField' #396

Open zhangwenjian opened 6 years ago

zhangwenjian commented 6 years ago

I'm developping with:

When I open http://localhost:8001/api-token-auth/,it shows: 'module' object has no attribute 'JSONField'

So I make a comment here: /usr/lib/python2.7/site-packages/djangorestframework-3.7.3-py2.7.egg/rest_framework/serializers.py

ModelSerializer.serializer_field_mapping[postgres_fields.JSONField] = JSONField

Then it's ok, a token is obtained. Is there anything wrong? I have already installed: