Allow change forms to specify JS and CSS bundles.

Review Request #8461 — Created Oct. 13, 2016 and submitted

Information

Djblets
release-0.10.x
4c22ef2...

Reviewers

There are times when an individual change form will want to specify some custom
JavaScript or CSS to be attached to the page. We already had a similar facility
for configforms-based forms. This change makes that same feature available to
regular change forms (which are used throughout the admin UI, and in places
like integration configuration).

Used this in conjunction with the new Review Bot integration. Saw that my
custom JS/CSS was loaded. Verified that other random change forms still worked.

Description From Last Updated

Since this template may be used with other types of forms, we can't outright assume that form.css_bundle_names and form.js_bundle_names exist, …

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/forms/forms/key_value_form.py
    
    Ignored Files:
        djblets/forms/templates/djblets_forms/admin/change_form_page.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/forms/forms/key_value_form.py
    
    Ignored Files:
        djblets/forms/templates/djblets_forms/admin/change_form_page.html
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Since this template may be used with other types of forms, we can't outright assume that form.css_bundle_names and form.js_bundle_names exist, so we should wrap these in an if.

    1. {% for %} does the right thing if the item is missing.

  3. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.10.x (419d0ce)