Initialize Lazy Strings before passing to json.dumps

Review Request #5038 — Created Nov. 28, 2013 and submitted

Information

Djblets
master

Reviewers

When trying to view the Repository Admin page, the master branch throws a "Object is not serializable" error because the value getting passed is a Promise (django.utils.functional.Promise) object rather than a decodable string. Create a LazyEncoder that will check for this type and call force_text on it so that it gets initialized properly.
Reference: https://docs.djangoproject.com/en/dev/topics/serialization/#id2

WebUI - Ensured that the repository admin page works fine.

Description From Last Updated

Mind adding a docstring explaining the purpose briefly?

chipx86chipx86

Blank line between these.

chipx86chipx86
chipx86
  1. 
      
  2. djblets/util/templatetags/djblets_js.py (Diff revision 1)
     
     
    Show all issues

    Mind adding a docstring explaining the purpose briefly?

  3. djblets/util/templatetags/djblets_js.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  4. 
      
RA
david
  1. Ship It!
  2. 
      
RA
Review request changed
Status:
Completed
Change Summary:
Pushed to master (2e6d4ec). Thanks!