Changeset - f20d2bd63c26
[Not reviewed]
0 1 0
Christopher Neugebauer - 6 years ago 2018-09-05 02:51:07
chrisjrn@gmail.com
Inventory populator
1 file changed with 29 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/management/commands/populate_inventory.py
Show inline comments
...
 
@@ -10,9 +10,9 @@ 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 NBPy2017 inventory model'
 
    help = 'Populates the inventory with the NBPy2018 inventory model'
 

	
 
    def add_arguments(self, parser):
 
        pass
 

	
...
 
@@ -38,8 +38,13 @@ class Command(BaseCommand):
 
            Group,
 
            ("name", ),
 
            name="Conference volunteers",
 
        )
 
        self.group_rejected_or_waitlist = self.find_or_make(
 
            Group,
 
            ("name", ),
 
            name="Rejected or Waitlisted Speakers",
 
        )
 
        self.group_unpublish = self.find_or_make(
 
            Group,
 
            ("name", ),
 
            name="Can see unpublished products",
...
 
@@ -64,9 +69,9 @@ class Command(BaseCommand):
 
            inv.Category,
 
            ("name",),
 
            name="T-Shirt",
 
            description="Commemorative conference t-shirts, featuring secret "
 
                        "North Bay Python 2017 artwork. Details of sizing and "
 
                        "North Bay Python 2018 artwork. Details of sizing and "
 
                        "manufacturer are on our <a href='/attend/tshirt'>"
 
                        "t-shirts page</a>",
 
            required = False,
 
            render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
...
 
@@ -129,8 +134,17 @@ class Command(BaseCommand):
 
            price=Decimal("00.00"),
 
            reservation_duration=hours(24),
 
            order=50,
 
        )
 
        self.ticket_talk_proposer = self.find_or_make(
 
            inv.Product,
 
            ("name", "category",),
 
            category=self.ticket,
 
            name="Talk Proposer",
 
            price=Decimal("00.00"),
 
            reservation_duration=hours(24),
 
            order=50,
 
        )
 
        self.ticket_media = self.find_or_make(
 
            inv.Product,
 
            ("name", "category",),
 
            category=self.ticket,
...
 
@@ -270,8 +284,21 @@ class Command(BaseCommand):
 
        team.products.set([
 
            self.ticket_team,
 
        ])
 

	
 
        # Team tickets are for team members only
 
        team = self.find_or_make(
 
            cond.GroupMemberFlag,
 
            ("description", ),
 
            description="Talk proposer tickets",
 
            condition=cond.FlagBase.ENABLE_IF_TRUE,
 
        )
 
        team.group.set([self.group_rejected_or_waitlist])
 
        team.products.set([
 
            self.ticket_talk_proposer,
 
        ])
 

	
 

	
 
        # Speaker tickets are for primary speakers only
 
        speaker_tickets = self.find_or_make(
 
            cond.SpeakerFlag,
 
            ("description", ),
0 comments (0 inline, 0 general)