Added new exception type.
Implemented ModelWithCategory.get_ties_for_categories_qs().
Cache class refactored.
Implemented min_num and max_num checks for category editor.
Formatting changes in toolbox.
Docstrings are updated.