Skip to content

Commit

Permalink
Backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-certn committed Sep 25, 2020
1 parent 41d4339 commit 674d38c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/livefield/fields.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import django
from django.db import models

if django.VERSION < (2, 1):
BooleanField = models.NullBooleanField
else:
BooleanField = models.BooleanField

class LiveField(models.BooleanField):

class LiveField(BooleanField):
"""Support uniqueness constraints and soft-deletion.
Similar to a BooleanField, but stores False as NULL. This lets us use
Expand Down

0 comments on commit 674d38c

Please sign in to comment.