question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings caused by django_jsonfield_backport

See original GitHub issue

Hi, after installing django-auditlog==1.0.0 on Django 3.2.11 I can see many warnings caused probably by the django-jsonfield-backport dependency that look like this:

WARNINGS:
auditlog.LogEntry.additional_data: (django_jsonfield_backport.W001) You are using Django 3.1 or newer, which already has a built-in JSONField.
HINT: Use django.db.models.JSONField instead.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ivan-price-actedcommented, Feb 23, 2022

me too ^, i solved this by adding:

SILENCED_SYSTEM_CHECKS = [
    'django_jsonfield_backport.W001'
]

in the settings.py

1reaction
ivan-price-actedcommented, Apr 6, 2022

it’s not an ‘issue’ in the sense that there is no danger or problem, its simply saying that if you’r running django >= 3.1 the library should be using the built-in implementation of JSON field, not the backports one.

I suppose the fix is to detect the django version before importing the field, here: https://github.com/jazzband/django-auditlog/blob/master/auditlog/models.py#L15

but i understand its not a super prio for the kind person maintaining this awesome project

Read more comments on GitHub >

github_iconTop Results From Across the Web

laymonage/django-jsonfield-backport - GitHub
This package is fully compatible with the JSONField from Django 3.1. That means you just need to change your imports and edit your...
Read more >
JsonField in Django for MySQL - Stack Overflow
After create model got this Warning: (django_mysql.W004) django_mysql.models.JSONField is deprecated. HINT: Use django.db.models.JSONField or ...
Read more >
12990 (Add JSONField model field) - Django's bug tracker
I'm -1 on this, I think it's out of scope for Django core, and easily accomplished outside. Regardless I'm removing the 1.2 milestone,...
Read more >
Django-MySQL Documentation - Read the Docs
Warning : The query cache is disabled by default in MySQL 5.7.20+ and MariaDB ... versions of Django, you can use django-jsonfield-backport.
Read more >
django json field mysql, django jsonfield sqlite, django-jsonfield ...
Backport of the cross-DB JSONField model and form fields from Django 3.1. ... Fixed a regression in Django 3.1 that caused permission errors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found