We have to populate a timetable with subjects. What would be the best approach?
In our sample timetable there are 25 hours (keys), all the FH value should be replaced with random subjects as many as their corresponding hour.
timetable = [{'A1': "FH", 'B1': "FH", 'C1': "FH", 'D1': "FH", 'E1': "FH"},
{'A2': "FH", 'B2': "FH", 'C2': "FH", 'D2': "FH", 'E2': "FH"},
{'A3': "FH", 'B3': "FH", 'C3': "FH", 'D3': "FH", 'E3': "FH"},
{'A4': "FH", 'B4': "FH", 'C4': "FH", 'D4': "FH", 'E4': "FH"},
{'A5': "FH", 'B5': "FH", 'C5': "FH", 'D5': "FH", 'E5': "FH"}]
{'A2': "FH", 'B2': "FH", 'C2': "FH", 'D2': "FH", 'E2': "FH"},
{'A3': "FH", 'B3': "FH", 'C3': "FH", 'D3': "FH", 'E3': "FH"},
{'A4': "FH", 'B4': "FH", 'C4': "FH", 'D4': "FH", 'E4': "FH"},
{'A5': "FH", 'B5': "FH", 'C5': "FH", 'D5': "FH", 'E5': "FH"}]
subjects_required_hours = {"S1": 4, "S2": 3, "S3": 5, "S4": 3, "S5": 5, "S6": 5}
Regards
Britto
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF0v3b5pCyuQ_1Cypy7u50gp17M5-7b0_TLJ_jhXcnZuPE0wvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment