fix pieces of django 1.8 compatibility

This commit is contained in:
Frédéric Péters 2016-04-09 13:03:23 +02:00
parent b162999bd1
commit ea51cd37bc
2 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,7 @@ class CommuneForm(forms.ModelForm):
class Meta:
model = Commune
fields = '__all__'
def save(self):
obj = super(CommuneForm, self).save()
@ -104,6 +105,7 @@ class SectorForm(forms.ModelForm):
help_text=_('separated by commas'))
class Meta:
model = Sector
fields = '__all__'
class StreetsForm(forms.Form):

View File

@ -23,7 +23,8 @@ from io import BytesIO
from django.core.mail import EmailMessage
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.template.loader import get_template, Context
from django.template import Context
from django.template.loader import get_template
from .models import Commune
from .ods import Workbook