Changeset - db90ed20db90
[Not reviewed]
0 1 0
Clinton Roy - 5 years ago 2019-09-30 10:28:33
clinton.roy@gmail.com
add ticket students to the student ticket cap. lots of tiny styling issues.
1 file changed with 11 insertions and 8 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/management/commands/populate_inventory.py
Show inline comments
 
from collections import namedtuple
 
from datetime import datetime
 
from datetime import timedelta
 
from decimal import Decimal
 
from django.conf import settings
...
 
@@ -130,7 +129,7 @@ class Command(BaseCommand):
 
            ("name",),
 
            name="Shirt",
 
            description="Commemorative conference polo shirts, featuring the "
 
                       f"linux.conf.au {settings.LCA_START.year} artwork.",
 
                        f"linux.conf.au {settings.LCA_START.year} artwork.",
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
 
            order=50,
...
 
@@ -279,8 +278,8 @@ class Command(BaseCommand):
 
        # Agreements
 
        self.accept_terms = self.find_or_make(
 
            inv.Product,
 
            ("name","category",),
 
            category = self.terms,
 
            ("name", "category",),
 
            category=self.terms,
 
            name="I Accept",
 
            price=Decimal("00.00"),
 
            reservation_duration=hours(24),
...
 
@@ -479,6 +478,11 @@ class Command(BaseCommand):
 
            condition=cond.FlagBase.DISABLE_IF_FALSE,
 
            limit=100,
 
        )
 

	
 
        student_ticket_cap.products.set([
 
            self.ticket_student,
 
        ])
 

	
 
        public_ticket_cap.products.set([
 
            self.ticket_fairy,
 
            self.ticket_professional,
...
 
@@ -653,13 +657,13 @@ class Command(BaseCommand):
 
        ])
 
        pdns_by_staff.categories.set([self.pdns_category, ])
 

	
 
        #Don't allow people to get anything if they don't have a ticket first
 
        # Don't allow people to get anything if they don't have a ticket first
 
        needs_a_ticket = self.find_or_make(
 
            cond.CategoryFlag,
 
            ("description", ),
 
            description="GottaGettaTicketFirst",
 
            condition=cond.FlagBase.DISABLE_IF_FALSE,
 
            enabling_category = self.ticket
 
            enabling_category=self.ticket
 
        )
 
        needs_a_ticket.categories.set([
 
            self.extras,
...
 
@@ -673,7 +677,7 @@ class Command(BaseCommand):
 
            ("description", ),
 
            description="Must Accept Terms",
 
            condition=cond.FlagBase.DISABLE_IF_FALSE,
 
            enabling_category = self.terms,
 
            enabling_category=self.terms,
 
        )
 
        needs_agreement.categories.set([
 
            self.extras,
...
 
@@ -683,7 +687,6 @@ class Command(BaseCommand):
 
            self.speakers_dinner_ticket,
 
        ])
 

	
 

	
 
    def populate_discounts(self):
 
        def add_early_birds(discount):
 
            self.find_or_make(
0 comments (0 inline, 0 general)