Refactor avatar service forms to use prefixes

Review Request #8256 — Created June 22, 2016 and submitted

Information

Djblets
release-0.10.x
9484225...

Reviewers

The individual avatar service settings forms are now rendered with
prefixes so that their fields do not clobber eachother. In addition, the
rendering of forms has been drastically simplified by initializing all
forms in __init__() instead of get_extra_context() and providing the
form data there. The client-side JS has been updated to reference these
new prefixed for fields.

Also, some bugs were fixed relating to avatar services. Namely:
- we were not passing the avatar settings manager from the registry to
each avatar service; and
- the file upload avatar service did not ever successfully validate.

  • Ran unit tests.
  • Able to change avatar services.
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/avatars/forms.py
        djblets/avatars/registry.py
        djblets/avatars/services/file_upload.py
    
    Ignored Files:
        djblets/avatars/templates/avatars/settings_form.html
        djblets/static/djblets/js/avatars/views/avatarSettingsFormView.es6.js
        djblets/static/djblets/js/avatars/views/fileUploadSettingsFormView.es6.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/avatars/forms.py
        djblets/avatars/registry.py
        djblets/avatars/services/file_upload.py
    
    Ignored Files:
        djblets/avatars/templates/avatars/settings_form.html
        djblets/static/djblets/js/avatars/views/avatarSettingsFormView.es6.js
        djblets/static/djblets/js/avatars/views/fileUploadSettingsFormView.es6.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (50ca77b)
Loading...