Changeset - 8badb0cb99fa
[Not reviewed]
0 1 0
Clinton Roy - 5 years ago 2019-10-19 01:38:29
clintonr@ansto.gov.au
first stab at making a room slot, still not quite there, think i have to make a separate slot for each time slot
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/management/commands/update_schedule.py
Show inline comments
...
 
@@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand
 

	
 
from symposion.conference.models import Section, current_conference
 

	
 
from symposion.schedule.models import (Day, Presentation, Room, SlotKind, Schedule, Slot)
 
from symposion.schedule.models import (Day, Presentation, Room, SlotKind, Schedule, Slot, SlotRoom)
 

	
 
from symposion.proposals.models import ProposalBase
 

	
...
 
@@ -109,6 +109,7 @@ class Command(BaseCommand):
 
        for room_name in room_names:
 
            room, _created = Room.objects.get_or_create(
 
                schedule=schedule, name=room_name, order=used_rooms.index(room_name))
 
            rooms[room_name] = room
 

	
 
        slotkinds = {}
 
        for slotkind_name in slotkind_names:
...
 
@@ -141,6 +142,8 @@ class Command(BaseCommand):
 

	
 
            slot = slots[(date, kind_name, start_time, end_time)]
 

	
 
            slotroom = SlotRoom.objects.get_or_create(slot=slot, room=rooms[room])
 

	
 
            proposal = ProposalBase.objects.filter(pk=talk_id).first()
 

	
 
            assert proposal, f"Could not find proposal {talk_id}"
0 comments (0 inline, 0 general)