target Django >=2,<2.3 (#20562)

We need it for support of autocompletion in admin pages.
* rename django.core.urlresolvers to django.urls
* update migrations
* fix warning about PercentagePerYearField.from_db_value() context arg
* fix warning about deprecated {% load staticfiles %}

This commit also remove support for py2.
* tox.ini: only run with py3
* remove all u'' strings
* remove imports from __future__
This commit is contained in:
Benjamin Dauvergne 2020-01-30 18:11:57 +01:00
parent c59aca65ba
commit ef922d091f
36 changed files with 89 additions and 147 deletions

2
debian/config.py vendored
View File

@ -29,7 +29,7 @@ if os.path.exists('/etc/barbacompta/idp-metadata.xml'):
'first_name': '{attributes[first_name][0]}',
'last_name': '{attributes[last_name][0]}',
}
MELLON_SUPERUSER_MAPPING = {"is_superuser": (u"true",)}
MELLON_SUPERUSER_MAPPING = {"is_superuser": ("true",)}
MELLON_USERNAME_TEMPLATE = "{attributes[username][0]}"
MELLON_PUBLIC_KEYS = ['/etc/barbacompta/saml.crt']
MELLON_PRIVATE_KEY = '/etc/barbacompta/saml.key'

4
debian/control vendored
View File

@ -9,8 +9,8 @@ Homepage: https://dev.entrouvert.org/projects/barbacompta
Package: python3-barbacompta
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends},
python3-django (>= 1:1.11),
python3-django (<< 1:1.12),
python3-django (>= 1:2.2),
python3-django (<< 1:3),
python3-weasyprint,
python3-cairosvg
Description: Logiciel de compta/facturation interne

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -40,7 +40,7 @@ def export_as_csv(modeladmin, request, queryset):
values = [text_type(getattr(obj, field)) for field in field_names]
for m2m_field in m2m_field_names:
value = getattr(obj, m2m_field)
value = u",".join(map(text_type, value.all()))
value = ",".join(map(text_type, value.all()))
values.append(text_type(value))
writer.writerow(map(lambda x: text_type.encode(x, "utf8"), values))
return response

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import hashlib
from functools import wraps

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import csv
from datetime import datetime

View File

@ -1,5 +1,3 @@
# coding: utf-8
from datetime import date
from django.core.management.base import BaseCommand

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from datetime import timedelta, date, datetime

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -55,7 +53,7 @@ class Commentaire(models.Model):
content_object = GenericForeignKey("content_type", "object_id")
def __str__(self):
return u"Commentaire créé le %s" % self.creation
return "Commentaire créé le %s" % self.creation
@six.python_2_unicode_compatible

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -19,7 +19,7 @@ from decimal import Decimal
from django import template
from django.db.models import Sum
from django.core.urlresolvers import reverse
from django.urls import reverse
from ..models import LigneBanquePop, solde
from ...decorators import cache

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,14 +14,13 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import datetime as dt
from django.contrib import admin
from django.conf.urls import url
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.contrib.admin.options import BaseModelAdmin
import django.http as http
from django.contrib.humanize.templatetags.humanize import ordinal
@ -174,7 +171,7 @@ class ContratAdmin(LookupAllowed, admin.ModelAdmin):
)
else:
new_intitule = contrat.intitule
new_intitule += u' dupliqué le %s' % dt.datetime.now()
new_intitule += ' dupliqué le %s' % dt.datetime.now()
form = forms.DuplicateContractForm(initial={'contrat': contrat.id, 'new_intitule': new_intitule})
context = {
'form': form,
@ -342,7 +339,7 @@ class FactureAdmin(LookupAllowed, admin.ModelAdmin):
def show_client(self, obj):
url = reverse('admin:eo_facture_client_change', args=[obj.client.id])
return format_html('<a href="{0}">{1}</a>', url, obj.client)
show_client.short_description = u'Client'
show_client.short_description = 'Client'
def show_contrat(self, obj):
if obj.contrat:

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from decimal import Decimal, InvalidOperation

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from decimal import Decimal
@ -74,7 +71,7 @@ class RapidFactureForm(forms.Form):
try:
ligne.clean()
except ValidationError as e:
error = u"Il y a un problème avec la ligne « %s »: " % prestation.intitule
error = "Il y a un problème avec la ligne « %s »: " % prestation.intitule
error += "; ".join(map(lambda x: x.rstrip("."), e.messages))
errors.append(error)
if errors:
@ -87,7 +84,7 @@ class RapidFactureForm(forms.Form):
class DuplicateContractForm(forms.Form):
contrat = forms.ModelChoiceField(queryset=models.Contrat.objects.all())
new_intitule = forms.CharField(max_length=150, label=u"Nouvel intitulé")
new_intitule = forms.CharField(max_length=150, label="Nouvel intitulé")
def __init__(self, request=None, *args, **kwargs):
self.request = request

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import eo_gestion.eo_facture.models
@ -32,7 +29,7 @@ class Migration(migrations.Migration):
models.CharField(
blank=True,
max_length=50,
verbose_name=b'Courriel',
verbose_name='Courriel',
validators=[django.core.validators.EmailValidator()],
),
),
@ -41,8 +38,8 @@ class Migration(migrations.Migration):
models.CharField(
blank=True,
max_length=20,
verbose_name=b'T\xc3\xa9l\xc3\xa9phone',
validators=[django.core.validators.RegexValidator(b'[. 0-9]*')],
verbose_name='Téléphone',
validators=[django.core.validators.RegexValidator('[. 0-9]*')],
),
),
('monnaie', models.CharField(default='\u20ac', max_length=10)),
@ -50,7 +47,7 @@ class Migration(migrations.Migration):
'tva',
models.DecimalField(
default=Decimal('20'),
verbose_name=b'TVA par d\xc3\xa9faut',
verbose_name='TVA par défaut',
max_digits=8,
decimal_places=2,
),
@ -89,7 +86,7 @@ class Migration(migrations.Migration):
(
'creator',
models.ForeignKey(
verbose_name=b'Cr\xc3\xa9ateur', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE
verbose_name='Créateur', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE
),
),
],
@ -105,13 +102,13 @@ class Migration(migrations.Migration):
),
(
'proforma',
models.BooleanField(default=True, db_index=True, verbose_name=b'Facture proforma'),
models.BooleanField(default=True, db_index=True, verbose_name='Facture proforma'),
),
(
'ordre',
models.IntegerField(
verbose_name=b"Num\xc3\xa9ro de la facture dans l'ann\xc3\xa9e",
unique_for_year=b'emission',
verbose_name="Numéro de la facture dans l'année",
unique_for_year='emission',
null=True,
editable=False,
blank=True,
@ -141,7 +138,7 @@ class Migration(migrations.Migration):
decimal_places=2,
),
),
('paid', models.BooleanField(default=False, db_index=True, verbose_name='Sold\xe9e')),
('paid', models.BooleanField(blank=True, default=False, db_index=True, verbose_name='Soldée')),
(
'client',
models.ForeignKey(
@ -223,6 +220,7 @@ class Migration(migrations.Migration):
(
'ligne_banque_pop',
models.ForeignKey(
limit_choices_to={'montant__gt': 0},
related_name='payments',
verbose_name='Encaissement',
to='eo_banque.LigneBanquePop',
@ -241,7 +239,7 @@ class Migration(migrations.Migration):
models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True),
),
('intitule', models.CharField(max_length=255, verbose_name='Intitul\xe9')),
('optionnel', models.BooleanField(default=False)),
('optionnel', models.BooleanField(blank=True, default=False)),
('prix_unitaire_ht', models.DecimalField(max_digits=8, decimal_places=2)),
('quantite', models.DecimalField(max_digits=8, decimal_places=2)),
(

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from django.db import migrations, models
@ -31,6 +28,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='client',
name='picture',
field=models.ImageField(upload_to=b'logos/', null=True, blank=True, verbose_name=b'Logo'),
field=models.ImageField(upload_to='logos/', null=True, blank=True, verbose_name='Logo'),
),
]

View File

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
@ -15,7 +12,7 @@ class Migration(migrations.Migration):
model_name='contrat',
name='public_description',
field=models.TextField(
verbose_name=b'Description publique',
verbose_name='Description publique',
blank=True,
help_text='Si elle est présente, cette description sera reprise dans la liste des références sur le site web.',
),

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from django.db import migrations, models
@ -31,6 +28,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='contrat',
name='image',
field=models.ImageField(upload_to=b'images/', null=True, blank=True, verbose_name=b'Image'),
field=models.ImageField(upload_to='images/', null=True, blank=True, verbose_name='Image'),
),
]

View File

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2019-03-17 13:02
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from decimal import Decimal
from django.db import migrations, models

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from decimal import Decimal, ROUND_HALF_UP
import datetime
@ -55,7 +52,7 @@ class Client(models.Model):
max_length=20, validators=[validate_telephone], verbose_name='Téléphone', blank=True
)
contacts = models.TextField(verbose_name=_('Contacts'), blank=True)
monnaie = models.CharField(max_length=10, default=u'')
monnaie = models.CharField(max_length=10, default='')
tva = models.DecimalField(
verbose_name='TVA par défaut', max_digits=8, decimal_places=2, default=Decimal(DEFAULT_TVA)
)
@ -69,7 +66,7 @@ class Client(models.Model):
def one_hundred_percent_this_year():
return u"%s:100" % datetime.date.today().year
return "%s:100" % datetime.date.today().year
@six.python_2_unicode_compatible
@ -188,20 +185,20 @@ class Facture(models.Model):
)
client = models.ForeignKey(Client, related_name='direct_factures', null=True, blank=True, on_delete=models.CASCADE)
contrat = models.ForeignKey(Contrat, related_name='factures', blank=True, null=True, on_delete=models.CASCADE)
intitule = models.CharField(max_length=150, verbose_name=u'Intitulé', blank=True)
intitule = models.CharField(max_length=150, verbose_name='Intitulé', blank=True)
notes = models.TextField(blank=True)
emission = models.DateField(verbose_name=u"Émission", default=datetime.date.today, db_index=True)
emission = models.DateField(verbose_name="Émission", default=datetime.date.today, db_index=True)
echeance = models.DateField(verbose_name=echeance_verbose_name, default=today_plus_delai)
taux_tva = models.DecimalField(max_digits=8, decimal_places=2, default=Decimal(DEFAULT_TVA))
sous_traite = fields.EuroField(
default=Decimal(0),
verbose_name=u'Montant sous-traité',
help_text=u'indiquer une somme pas un pourcentage, hors-taxe',
verbose_name='Montant sous-traité',
help_text='indiquer une somme pas un pourcentage, hors-taxe',
)
paid = models.BooleanField(blank=True, verbose_name=u"Soldée", default=False, db_index=True)
creator = models.ForeignKey(User, verbose_name=u'Créateur', on_delete=models.CASCADE)
paid = models.BooleanField(blank=True, verbose_name="Soldée", default=False, db_index=True)
creator = models.ForeignKey(User, verbose_name='Créateur', on_delete=models.CASCADE)
account_on_previous_period = models.BooleanField(
verbose_name=u'Mettre cette facture sur l\'exercice précédent', default=False
verbose_name='Mettre cette facture sur l\'exercice précédent', default=False
)
objects = FactureQuerySet.as_manager()
@ -219,7 +216,7 @@ class Facture(models.Model):
ctx.update(self.__dict__)
if ctx["ordre"] is None:
return "Ordre is missing"
format = getattr(settings, "FACTURE_CODE_FORMAT", u"F%(year)s%(ordre)04d")
format = getattr(settings, "FACTURE_CODE_FORMAT", "F%(year)s%(ordre)04d")
return format % ctx
def save(self):
@ -233,18 +230,18 @@ class Facture(models.Model):
self.intitule = self.contrat.intitule
if self.client:
if self.client != self.contrat.client:
raise ValidationError(u"Le client de la facture et du contrat doivent être identiques.")
raise ValidationError("Le client de la facture et du contrat doivent être identiques.")
else:
self.client = self.contrat.client
else:
if not self.intitule:
raise ValidationError(u"La facture doit avoir un intitulé")
raise ValidationError("La facture doit avoir un intitulé")
if not self.proforma:
try:
for ligne in self.lignes.all():
ligne.clean()
except ValidationError:
raise ValidationError(u"Il y a un problème avec les lignes de cette facture")
raise ValidationError("Il y a un problème avec les lignes de cette facture")
self.update_paid(save=False)
def index(self):
@ -327,9 +324,9 @@ class Ligne(models.Model):
def clean(self):
errors = []
if self.taux_tva and self.taux_tva < 0:
errors.append(u"Le taux de tva doit être une valeur positive ou nulle.")
errors.append("Le taux de tva doit être une valeur positive ou nulle.")
if self.prix_unitaire_ht < 0:
errors.append(u"Le prix unitaire hors taxe doit être une valeur positive ou nulle.")
errors.append("Le prix unitaire hors taxe doit être une valeur positive ou nulle.")
if self.facture.contrat and not self.facture.proforma:
facture = self.facture
contrat = facture.contrat

View File

@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_modify %}
{% load staticfiles %}
{% load static %}
{% block extrahead %}{{ block.super }}
{% url "admin:jsi18n" as jsi18nurl %}

View File

@ -1,7 +1,5 @@
# coding: utf-8
#
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -16,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from datetime import date, timedelta, datetime
from decimal import Decimal, InvalidOperation
@ -29,7 +26,7 @@ from django.db.models.signals import post_save, post_delete
from django.utils.formats import number_format
from django.utils.timesince import timesince
from django.utils.six import text_type
from django.core.urlresolvers import reverse
from django.urls import reverse
from eo_gestion.eo_facture.models import Contrat, Facture, DELAI_PAIEMENT, Payment
from eo_gestion.eo_banque.models import LigneBanquePop
@ -225,7 +222,7 @@ def income_by_clients(year=None):
running_total += percent_by_clients[client]
pareto[client] = running_total
return dict(
title=u"Chiffre d'affaire prévisionnel par client pour %s" % year,
title="Chiffre d'affaire prévisionnel par client pour %s" % year,
name="previsional-income-by-client-%s" % year,
headers=[
('client', 'Client'),

View File

@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import cgi
import json

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals, print_function
import logging

View File

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
#
# barbacompta - accounting for dummies
# barbacompta - invoicing for dummies
# Copyright (C) 2005-2013 Entr'ouvert
#
# This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load %}{% static "admin/" %}css/dashboard.css" />{% endblock %}

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from django.conf.urls import include, url

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from decimal import Decimal

View File

@ -1,6 +1,5 @@
#! /usr/bin/env python
from __future__ import print_function, unicode_literals
import os
import subprocess
@ -12,9 +11,9 @@ from setuptools import setup, find_packages
from setuptools.command.install_lib import install_lib as _install_lib
install_requires = [
'Django>=1.11,<1.12',
'Django>=1.11',
'weasyprint<0.43',
'django-model-utils<4',
'django-model-utils>=4',
]

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published

View File

@ -1,5 +1,5 @@
# barbacompta - accounting for dummies
# Copyright (C) 2010-2019 Entr'ouvert
# barbacompta - invoicing for dummies
# Copyright (C) 2019-2020 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
def test_homepage(app):

View File

@ -1,13 +1,13 @@
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/barbacompta/{env:BRANCH_NAME:}
envlist = py2,py3
envlist = py3
[testenv]
setenv =
DJANGO_SETTINGS_MODULE=eo_gestion.settings
BARBACOMPTA_SETTINGS_FILE=tests/settings.py
deps =
django>=1.11,<1.12
Django<2
psycopg2-binary
pytest
pytest-cov