From bb4e9dde4f0aa88f3fa6017e5e0f4b4662c080a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 5 Feb 2017 13:32:31 +0100 Subject: [PATCH] End of py2 support --- gestioncof/petits_cours_models.py | 11 +---------- gestioncof/petits_cours_views.py | 4 ---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/gestioncof/petits_cours_models.py b/gestioncof/petits_cours_models.py index 4428b78c..7e4f4165 100644 --- a/gestioncof/petits_cours_models.py +++ b/gestioncof/petits_cours_models.py @@ -1,14 +1,10 @@ # -*- coding: utf-8 -*- -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals +from functools import reduce from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ -from django.utils.encoding import python_2_unicode_compatible -from django.utils.six.moves import reduce def choices_length(choices): @@ -24,7 +20,6 @@ LEVELS_CHOICES = ( ) -@python_2_unicode_compatible class PetitCoursSubject(models.Model): name = models.CharField(_("Matière"), max_length=30) users = models.ManyToManyField(User, related_name="petits_cours_matieres", @@ -38,7 +33,6 @@ class PetitCoursSubject(models.Model): return self.name -@python_2_unicode_compatible class PetitCoursAbility(models.Model): user = models.ForeignKey(User) matiere = models.ForeignKey(PetitCoursSubject, verbose_name=_("Matière")) @@ -56,7 +50,6 @@ class PetitCoursAbility(models.Model): self.matiere, self.niveau) -@python_2_unicode_compatible class PetitCoursDemande(models.Model): name = models.CharField(_("Nom/prénom"), max_length=200) email = models.CharField(_("Adresse email"), max_length=300) @@ -103,7 +96,6 @@ class PetitCoursDemande(models.Model): self.created.strftime("%d %b %Y")) -@python_2_unicode_compatible class PetitCoursAttribution(models.Model): user = models.ForeignKey(User) demande = models.ForeignKey(PetitCoursDemande, verbose_name=_("Demande")) @@ -122,7 +114,6 @@ class PetitCoursAttribution(models.Model): % (self.demande.id, self.user.username, self.matiere) -@python_2_unicode_compatible class PetitCoursAttributionCounter(models.Model): user = models.ForeignKey(User) matiere = models.ForeignKey(PetitCoursSubject, verbose_name=_("Matiere")) diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index ee71d1a9..40b0feb9 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -1,9 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from django.shortcuts import render, get_object_or_404, redirect from django.core import mail from django.core.mail import EmailMessage