forked from DGNum/gestioCOF
End of py2 support
This commit is contained in:
parent
1e5c55a540
commit
bb4e9dde4f
2 changed files with 1 additions and 14 deletions
|
@ -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"))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue