From 08de5dfe6a5a8870a2e944e0a4509b8cb75b3d5c Mon Sep 17 00:00:00 2001 From: klmp200 Date: Thu, 19 Apr 2018 01:13:05 +0200 Subject: [PATCH] Migration to django 1.11 --- accounting/models.py | 2 -- core/management/commands/populate.py | 2 +- core/views/files.py | 2 +- requirements.txt | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/accounting/models.py b/accounting/models.py index 23174837..e5d73652 100644 --- a/accounting/models.py +++ b/accounting/models.py @@ -41,8 +41,6 @@ class CurrencyField(models.DecimalField): """ This is a custom database field used for currency """ - __metaclass__ = models.SubfieldBase - def __init__(self, *args, **kwargs): kwargs['max_digits'] = 12 kwargs['decimal_places'] = 2 diff --git a/core/management/commands/populate.py b/core/management/commands/populate.py index 185837eb..e76dfb02 100644 --- a/core/management/commands/populate.py +++ b/core/management/commands/populate.py @@ -418,7 +418,7 @@ Welcome to the wiki page! buying.save() comptes = AccountingType(code='6', label="Comptes de charge", movement_type='DEBIT') comptes.save() - simple = SimplifiedAccountingType(label='Je fais du simple 6', accounting_type=comptes, movement_type='DEBIT') + simple = SimplifiedAccountingType(label='Je fais du simple 6', accounting_type=comptes) simple.save() woenzco = Company(name="Woenzel & co") woenzco.save() diff --git a/core/views/files.py b/core/views/files.py index 8b57983c..5df973be 100644 --- a/core/views/files.py +++ b/core/views/files.py @@ -31,7 +31,7 @@ from django.forms.models import modelform_factory from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponse -from django.core.servers.basehttp import FileWrapper +from wsgiref.util import FileWrapper from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django import forms diff --git a/requirements.txt b/requirements.txt index b94274f4..fb8595e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ # Django 1.8 LTS is required, version 1.9 is not supported -Django >=1.8,<1.9 +Django >=1.11, <2.0 Pillow mistune django-jinja pyopenssl pytz -djangorestframework <3.7 +djangorestframework django-phonenumber-field django-ajax-selects reportlab