diff --git a/pinaxcon/registrasion/management/commands/populate_inventory.py b/pinaxcon/registrasion/management/commands/populate_inventory.py index bbe4728f7c804d9512fe6f312cd528fcd1f0588b..b787f1495781524a40110629fbb4701f0ecc2e4a 100644 --- a/pinaxcon/registrasion/management/commands/populate_inventory.py +++ b/pinaxcon/registrasion/management/commands/populate_inventory.py @@ -4,13 +4,15 @@ from datetime import timedelta from decimal import Decimal from django.contrib.auth.models import Group from django.core.exceptions import ObjectDoesNotExist -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand from registrasion.models import inventory as inv from registrasion.models import conditions as cond from symposion import proposals + class Command(BaseCommand): + help = 'Populates the inventory with the LCA2017 inventory model' def add_arguments(self, parser): @@ -55,7 +57,7 @@ class Command(BaseCommand): description="Each type of ticket has different included products. " "For details of what products are included, see our " "[LINK]registration details page.[/LINK]", - required = True, + required=True, render_type=inv.Category.RENDER_TYPE_RADIO, limit_per_user=1, order=1, @@ -68,7 +70,7 @@ class Command(BaseCommand): "Wednesday 18 January. All attendees may purchase " "seats at the dinner, even if a dinner ticket is not " "included in your conference ticket price.", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_QUANTITY, limit_per_user=10, order=10, @@ -81,7 +83,7 @@ class Command(BaseCommand): "evening of Tuesday 17 January. You may purchase up " "to 5 tickets in total, for significant others, and " "family members.", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_QUANTITY, limit_per_user=5, order=20, @@ -95,7 +97,7 @@ class Command(BaseCommand): "January, and is restricted to Professional Ticket " "holders, speakers, miniconf organisers, and invited " "guests.", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_RADIO, limit_per_user=1, order=30, @@ -106,7 +108,7 @@ class Command(BaseCommand): name="T-Shirt", description="Commemorative conference t-shirts, featuring secret " "linux.conf.au 2017 artwork.", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY, order=40, ) @@ -124,7 +126,7 @@ class Command(BaseCommand): "other hotels, including Wrest Point can be booked " "elsewhere. For full details, see [LINK]our " "accommodation page.[/LINK]", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_RADIO, limit_per_user=1, order=50, @@ -135,7 +137,7 @@ class Command(BaseCommand): name="Extras", description="Other items that can improve your conference " "experience.", - required = False, + required=False, render_type=inv.Category.RENDER_TYPE_QUANTITY, order=60, )