• 
      

    Allow static media bundles to apply to certain URLs.

    Review Request #5370 — Created Jan. 31, 2014 and submitted — Latest diff uploaded

    Information

    Djblets
    master

    Reviewers

    Allow static media bundles to apply to certain URLs.

    We previously only had one special type of static media bundle: "default".
    This would appear on all pages. Extensions wanting finer page control
    would have to use a TemplateHook with a set of URL names and a template
    for loading the bundles, which was annoying and inefficient.

    Now, static bundles can have an "apply_to" field containing a list of
    URL names. When rendering default static bundles for a page, all bundles
    matching that page's URL name will be included.

    Tested with a custom bundle in an extension. Limited it to the review request
    page and the diff viewer, and saw that it only loaded on those pages.