Skip to content

Commit

Permalink
Patch for Django < 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
millerdev committed Mar 31, 2022
1 parent 61cf908 commit ac6f213
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ def to_python(self, value):

JSONField.to_python = to_python

import django
if django.VERSION < (3, 1):
# TODO remove after upgrading to Django 3.2
from django.contrib.postgres.fields.jsonb import JSONField
import django.db.models
django.db.models.JSONField = JSONField


# HACK monkey-patch django setup to prevent second setup by django_nose
def _setup_once(*args, **kw):
Expand Down

0 comments on commit ac6f213

Please sign in to comment.