Split up reviews/models.py into multiple files.

Review Request #5251 — Created Jan. 14, 2014 and submitted

Information

Review Board
master

Reviewers

models.py was getting too huge and unmaintainable. In order to keep
things sane, it has been split up into one file per class.

This is more of an implementation detail, as callers are welcome to
continue importing from reviewboard.reviews.models. Django itself only
looks in this module for models anyway.

The code is mostly left unchanged, though there are a few changes:

  • To resolve circular dependencies, many ModelName.DoesNotExist
    exceptions have been replaced with ObjectDoesNotExist, and
    some imports were added to functions (at most one per file though,
    and only in a couple files).

  • Some old docstrings have been fixed up to have a one-line summary.

  • Added app_label = "reviews" to a much of Meta classes. This is
    required to tell Django that it's in the "reviews" module.

Unit tests pass.

Loaded a review request. Created a comment and published the review.
Replied to the comment. Basic functionality all seems to work.

Description From Last Updated

This should import unicode_literals

daviddavid