• 
      

    Split resources.py into per-resource files.

    Review Request #4524 — Created Sept. 3, 2013 and submitted — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    Split resources.py into per-resource files.

    resources.py has become unmanageable, so it's now split up into a bunch
    of different files.

    The problem going into this was the interdependency between resources.
    At class definition time, they neatly form a tree, but at request
    handler time, there are circular dependencies.

    The solution to this is to have a Resources class that dynamically loads
    the right resources from the right places upon request, and caches
    them. All references to resource instances go through this, and it
    handles dishing them out. It also handles registering them against
    models.

    The logic for resources haven't changed. It's just code movement. The
    only major change here is the logic in resources/init.py.

    Unit tests run.

    Docs build.

    Web UI works.