Allow multiple allocations for a topic
Support creation of disjoint slots for a given topic, to support the new "scattered" topic layout we plan to use for HK. Change-Id: I9bd382c05234a58a162dbcbb7efced396d0ff7e9
This commit is contained in:
parent
e340d96d6d
commit
cecd79f1c5
@ -44,9 +44,9 @@ class Command(BaseCommand):
|
||||
r = Room(code=roomcode, name=roomdesc)
|
||||
r.save()
|
||||
|
||||
for topicname, desc in data['topics'].iteritems():
|
||||
for desc in data['allocations']:
|
||||
started = False
|
||||
t = Topic.objects.get(name=topicname)
|
||||
t = Topic.objects.get(name=desc['topic'])
|
||||
room = Room.objects.get(code=desc['room'])
|
||||
for (d, h) in slot_generator(data):
|
||||
if (d == desc['start_day'] and h == desc['first_slot']):
|
||||
|
@ -21,10 +21,12 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"topics": {
|
||||
"Swift": {
|
||||
"allocations": [
|
||||
{
|
||||
"topic": "Swift",
|
||||
"room": "A",
|
||||
"start_day": "2012-09-20", "first_slot": "09:30",
|
||||
"end_day": "2012-09-21", "last_slot": "10:00" }
|
||||
"end_day": "2012-09-21", "last_slot": "10:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user