Skip to content

Commit

Permalink
Aadditional updates to address Django 3.x (and prepping for 4.x!) com…
Browse files Browse the repository at this point in the history
…patibility.
  • Loading branch information
james-certn committed Sep 25, 2020
1 parent 66bf1e8 commit 41d4339
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Contributors
| `Dylan Verheul <http://github.com/dyve>`_
| `Grant McConnaughey <http://github.com/grantmcconnaughey>`_
| `Luke Burden <http://github.com/lukeburden>`_
| `James Addison <http://github.com/jaddison>`_
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

3.3.0
--------------------
- Django 3.x support
- switch to BooleanField as base (Django 4.x deprecation)

3.2.1
--------------------
- Fix rST formatting in this file to pass PyPI rendering check
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run_tests(self):

setup(
name='django-livefield',
version='3.2.1',
version='3.3.0',
description='Convenient soft-deletion support for Django models',
long_description=(
open('README.rst').read() + '\n\n' +
Expand All @@ -79,6 +79,8 @@ def run_tests(self):
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
Expand Down
4 changes: 2 additions & 2 deletions src/livefield/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.db import models


class LiveField(models.NullBooleanField):
class LiveField(models.BooleanField):
"""Support uniqueness constraints and soft-deletion.
Similar to a BooleanField, but stores False as NULL. This lets us use
Expand All @@ -14,7 +14,7 @@ class LiveField(models.NullBooleanField):
description = u'Soft-deletion status'

def __init__(self, *args, **kwargs):
super(LiveField, self).__init__(default=True, null=True)
super(LiveField, self).__init__(default=True, null=True, blank=True)

def get_prep_value(self, value):
# Convert in-Python value to value we'll store in DB
Expand Down

0 comments on commit 41d4339

Please sign in to comment.