Initialize Lazy Strings before passing to json.dumps

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

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.