rpkilby / jsonfield

A reusable Django model field for storing ad-hoc JSON data
MIT License
1.16k stars 271 forks source link

Django "from_db_value" method signature change #250

Closed ding1992 closed 4 years ago

ding1992 commented 4 years ago

Hi,

I'm using django 1.11.28. All its current implementations of from_db_value are with signature def from_db_value(self, value, expression, connection, context) Ref: https://github.com/django/django/blob/stable/1.11.x/django/contrib/gis/db/models/sql/conversion.py While jsonfield's signature is still def from_db_value(self, value, expression, connection), I'm getting TypeError: from_db_value() takes 4 positional arguments but 5 were given

rpkilby commented 4 years ago

Hi @ding1992. The current version only supports Django 2.2 and 3.0.

https://github.com/rpkilby/jsonfield/blob/cb749a8e5de019c88349a184c2863429923b767f/setup.py#L18

If you want to work with an older version of Django, install jsonfield<3