FinalsClub/djKarma

Move accesser helping functions to the models they access

Closed this issue · 0 comments

We have a number of views.py private helper functions for modualizing some Django queries. These can be moved to a method of the model Class that they access.

ex: School should contain _get_classes() even though it returns a School and many Courses.

For functions that belong to many classes, use python's multiple inheritance

class School(models.model query_helper):
    ''' '''
    ...