Passage à python 3 - strings

This commit is contained in:
Martin Pépin 2016-07-08 23:04:34 +02:00 committed by Basile Clement
parent 21b8b6042f
commit b3c45afb49
3 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,7 @@
# coding: utf-8
from __future__ import unicode_literals
from django import forms
from django.forms.models import BaseInlineFormSet
from bda.models import Spectacle
@ -33,7 +35,7 @@ class TokenForm(forms.Form):
class SpectacleModelChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
return u"%s le %s (%s) à %.02f" % (obj.title, obj.date_no_seconds(),
return "%s le %s (%s) à %.02f" % (obj.title, obj.date_no_seconds(),
obj.location, obj.price)