Initial working commit for faster CourseSummary. The optimisation is done so that the course summary takes the responsibility of going through all the data and constructing the ExerciseSummaries (and ExerciseRoundSummaries and CategorySummaries) so that constructing the ExerciseSummaries in a loop wouldn't cause database queries.
Refactored to PEP8.
More PEP8
Whole file to PEP8.
- Since the ordering of the round summaries in the CourseSummary was removed, I added a method which gives the round summaries in correct order.
- The categorizing of exercises in ExerciseRoundSummaries was broken when generate=False was used because the code was in _generate_summary. I lifted that piece of code out of there, to the __init__.
PEP8
PEP8 and imports
Merge pull request #101 from Rubinous/faster_summaries

Faster summaries