luxcoder/contest_system — Issue #7: Add option to select contest when adding/editing task
Author: luxcoder
Created: 2011-12-31 13:58:18+00:00
State: open

Steps to follow:

- create contest_id field in task model (Integer + foreign key, where does foreign key belongs? Task or Contest?)

- add ContestIdValidator to lib.validators

pseudocode:
...
validate_python(.. value ..):
contest = Session.query(Contest).get(value)
if contest == None:
raise Error
else:
#everything fine
pass
...

- add select box to template, validator to model.taskform, contest_id mapping to controller

- test code

- add to master if stable