From ac5fb77c7ad84ee5096eecb643ec43e4e51b4e45 Mon Sep 17 00:00:00 2001 From: Stephan Telling Date: Thu, 17 Aug 2017 21:18:43 +0200 Subject: [PATCH] update bootstrap script with camps for tickettype --- .../management/commands/bootstrap-devsite.py | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/utils/management/commands/bootstrap-devsite.py b/src/utils/management/commands/bootstrap-devsite.py index 7a6f6c9d..bcdb877a 100644 --- a/src/utils/management/commands/bootstrap-devsite.py +++ b/src/utils/management/commands/bootstrap-devsite.py @@ -206,20 +206,6 @@ class Command(BaseCommand): light_text=True ) - self.output('Creating tickettypes...') - TicketType.objects.create( - name='Adult Full Week' - ) - TicketType.objects.create( - name='Adult One Day' - ) - TicketType.objects.create( - name='Child Full Week' - ) - TicketType.objects.create( - name='Child One Day' - ) - self.output("Creating productcategories...") transportation = ProductCategory.objects.create( name='Transportation', @@ -399,6 +385,25 @@ class Command(BaseCommand): for camp in [camp2016, camp2017, camp2018]: year = camp.camp.lower.year + self.output('Creating tickettypes for {}...'.format(year)) + TicketType.objects.create( + name='Adult Full Week', + camp=camp + ) + TicketType.objects.create( + name='Adult One Day', + camp=camp + ) + TicketType.objects.create( + name='Child Full Week', + camp=camp + ) + TicketType.objects.create( + name='Child One Day', + camp=camp + ) + + self.output('Creating eventlocations for {}...'.format(year)) speakers_tent = EventLocation.objects.create( name='Speakers Tent',