Skip to content

Commit

Permalink
Add Django 3.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kudinov committed Jul 15, 2020
1 parent 95626fd commit 2fb53a9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: false
language: python
python:
- "2.7"
- "3.6"

before_install:
- pip install codecov
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
django-versionfield
====

[![Build Status](https://travis-ci.org/tonioo/django-versionfield.svg?branch=master)](https://travis-ci.org/tonioo/django-versionfield)
[![codecov](https://codecov.io/gh/tonioo/django-versionfield/branch/master/graph/badge.svg)](https://codecov.io/gh/tonioo/django-versionfield)
[![Build Status](https://travis-ci.org/termius/django-versionfield.svg?branch=master)](https://travis-ci.org/termius/django-versionfield)
[![codecov](https://codecov.io/gh/termius/django-versionfield/branch/master/graph/badge.svg)](https://codecov.io/gh/termius/django-versionfield)

Usage:
from versionfield import VersionField
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

setup(
name="django-versionfield2",
version="0.5.0",
url='https://github.com/tonioo/django-versionfield',
version="0.6.0",
url='https://github.com/termius/django-versionfield',
license='BSD',
description="A DB Independent Custom Django Field for storing Version numbers for fast indexing",
author='Antoine Nguyen',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
install_requires=[
'Django<=1.10.99',
'Django>=3.0.0',
'six>=1.9.0',
],
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion test_project/test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'versionfield',
]

MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down
4 changes: 2 additions & 2 deletions versionfield/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import six

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from six import python_2_unicode_compatible

from . import forms
from .constants import DEFAULT_NUMBER_BITS
Expand Down Expand Up @@ -44,7 +44,7 @@ def to_python(self, value):
self.number_bits
)

def from_db_value(self, value, expression, connection, context):
def from_db_value(self, value, expression, connection):
"""Convert data from database."""
if value is None:
return value
Expand Down
2 changes: 1 addition & 1 deletion versionfield/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import six

from django.utils.encoding import python_2_unicode_compatible
from six import python_2_unicode_compatible

from .utils import convert_version_string_to_int, convert_version_int_to_string

Expand Down

0 comments on commit 2fb53a9

Please sign in to comment.