justquick / django-activity-stream

Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.
http://django-activity-stream.rtfd.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2.38k stars 482 forks source link

Try for or force Django's native JSONField #424

Closed raphaelyancey closed 5 years ago

raphaelyancey commented 5 years ago

django-jsonfield conflicts with Django's native JSONField, and instead of converting the codebase I'd like actstream to use it if possible.

Should we maybe create a JSONFIELD_IMPLEMENTATION setting to force which JSONField the module will use, since we cannot check for sure if the user is running its database(s) on PostgreSQL? And defaults to django-jsonfield's implementation.

# settings.py

from django.contrib.postgres.fields import JSONField

ACTSTREAM_SETTINGS = {
    # ...
    'JSONFIELD_IMPLEMENTATION': JSONField
    # ...
}
raphaelyancey commented 5 years ago

My bad, seems already implemented but the doc is not updated is that right? Can't find the code though.

raphaelyancey commented 5 years ago

... and that's because it's a django-jsonfield-compat setting. Question, answer :)