# HG changeset patch # User Branko Majic # Date 2017-12-21 15:24:15 # Node ID 2f79a5b24a365bf0b85fed0a97234e1273ed4bb4 # Parent d5446363fedf2189e49cca96dfc1c4ba6d09c010 CONNT-25: Updating application and project to use Django 1.8.x: - Switched to using GenericIPAddress instead of IPAddress in models. - Updated setup script and development requirements to use Django 1.8.x. - Updated release notes. diff --git a/conntrackt/migrations/0002_auto_20171221_1513.py b/conntrackt/migrations/0002_auto_20171221_1513.py new file mode 100644 --- /dev/null +++ b/conntrackt/migrations/0002_auto_20171221_1513.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('conntrackt', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='interface', + name='address', + field=models.GenericIPAddressField(), + ), + migrations.AlterField( + model_name='interface', + name='netmask', + field=models.GenericIPAddressField(default=b'255.255.255.255'), + ), + ] diff --git a/conntrackt/models.py b/conntrackt/models.py --- a/conntrackt/models.py +++ b/conntrackt/models.py @@ -20,7 +20,7 @@ # Django imports. -from django.contrib.admin.util import NestedObjects +from django.contrib.admin.utils import NestedObjects from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models @@ -346,8 +346,8 @@ class Interface(RelatedCollectorMixin, m name = models.CharField(max_length=100, default='eth0') description = models.TextField(blank=True, default='Main network interface.') entity = models.ForeignKey(Entity) - address = models.IPAddressField() - netmask = models.IPAddressField(default='255.255.255.255') + address = models.GenericIPAddressField() + netmask = models.GenericIPAddressField(default='255.255.255.255') class Meta: # Enforce uniqueness of interface name in an entity. Enforce uniqueness diff --git a/docs/releasenotes.rst b/docs/releasenotes.rst --- a/docs/releasenotes.rst +++ b/docs/releasenotes.rst @@ -17,7 +17,7 @@ dev Breaking changes: -* Django Conntrackt now depends on Django 1.7. In addition to official +* Django Conntrackt now depends on Django 1.8. In addition to official Django documentation, there is a dedicated upgrade guide that deals with the most basic installation. [ `CONNT-25 `_ ] diff --git a/requirements/base.in b/requirements/base.in --- a/requirements/base.in +++ b/requirements/base.in @@ -24,7 +24,7 @@ django-braces~=1.12.0 django-crispy-forms~=1.6.0 # Web framework used by application. -django~=1.7.0 +django~=1.8.0 # Library for programatic calculation of colours (contrasts, # inversions etc). diff --git a/requirements/development.txt b/requirements/development.txt --- a/requirements/development.txt +++ b/requirements/development.txt @@ -11,7 +11,7 @@ chardet==3.0.4 # via requests coverage==4.4.2 django-braces==1.12.0 django-crispy-forms==1.6.1 -django==1.7.11 +django==1.8.18 docutils==0.14 # via sphinx factory-boy==2.1.2 funcsigs==1.0.2 # via mock diff --git a/requirements/test.txt b/requirements/test.txt --- a/requirements/test.txt +++ b/requirements/test.txt @@ -11,7 +11,7 @@ chardet==3.0.4 # via requests coverage==4.4.2 django-braces==1.12.0 django-crispy-forms==1.6.1 -django==1.7.11 +django==1.8.18 docutils==0.14 # via sphinx factory-boy==2.1.2 funcsigs==1.0.2 # via mock diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ README = open(os.path.join(os.path.dirna INSTALL_REQUIREMENTS = [ "django-braces~=1.12.0", "django-crispy-forms~=1.6.0", - "django~=1.7.0", + "django~=1.8.0", "palette~=0.2.0", "pydot~=1.2.0", ]