py route code to accept oddnum mode and write to db