create place pages for taxi stations (#19287)

This commit is contained in:
Frédéric Péters 2018-02-12 16:05:25 +01:00
parent 22440cbe93
commit 48dd43d3ea
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ from combo.data.models import Page, ConfigJsonCell
class Command(BaseCommand):
def handle(self, *args, **options):
layers = ['mdr', 'piscine', 'mairie', 'bibliotheque', 'decheterie', 'donnerie']
layers = ['mdr', 'piscine', 'mairie', 'bibliotheque', 'decheterie', 'donnerie', 'taxi']
places_page = Page.objects.get(slug='lieux')
for layer in MapLayer.objects.filter(slug__in=layers):
@ -54,6 +54,8 @@ class Command(BaseCommand):
page.title = u'Déchèterie %s' % feature['properties']['commune']
elif layer.slug == 'donnerie':
page.title = u'Donnerie %s' % feature['properties']['commune']
elif layer.slug == 'taxi':
page.title = u'Station de taxi %s' % feature['properties']['adresse']
else:
page.title = feature['properties']['nom']
page.parent = Page.objects.get(slug=layer.slug)