horizon/horizon/utils
Akihiro Motoki 0c836454b2 Switch render() arguments to the new way
Previously template.render() takes Context or RequestContext object
but after Django 1.8 the method takes a dict and request as separate
arguments. The old way will be dropped in Django 1.10.
This commit update the usage based on the Django 1.8 release notes [1].

commit 95d78a140f addresses this
deprecations but it turns out all similar places are not switched.
I searched the code base more carefully and found more.
I hope this clean up all of them.

After this change, extra_context which was passed to (Request)Context
previously is no longer available in HttpResponse object.
Volume unit test is tightly coupled with the context information
and checks rendered actions using the context. Thus the corresponding
tests no longer work. Since we can use only HttpResponse.content
(which is a rendered HTML), the new tests just check various strings
like ID, link and label of a specific action.
This is tricky, but this is now the only thing we can do.

[1] https://docs.djangoproject.com/en/1.8/ref/templates/upgrading/#get-template-and-select-template

Change-Id: I350c22dc3d7db7b93ca4b823dac1e3d88beef1a7
2017-06-21 19:32:03 +00:00
..
__init__.py Unifies the project packaging into one set of modules. 2012-02-29 00:20:13 -08:00
babel_extract_angular.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
csvbase.py Switch render() arguments to the new way 2017-06-21 19:32:03 +00:00
escape.py Escape angularjs templating in unsafe HTML 2016-06-15 11:03:01 -04:00
file_discovery.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
filters.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
functions.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
html.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
lazy_encoder.py Translate status in network topology 2016-01-18 13:19:20 +00:00
memoized.py Replace six.iteritems(iter) with iter.items() 2016-12-14 11:13:20 +08:00
scss_filter.py SCSS $webroot should inherit from settings.py 2015-08-15 08:05:24 -07:00
secret_key.py Clarify message if key file has wrong permissions 2017-03-09 15:45:12 +00:00
settings.py Specify POLICY_CHECK_FUNCTION as a string 2016-11-25 13:06:14 +01:00
units.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00
validators.py Allow any port or protocol in security group rules 2017-03-29 04:53:02 +00:00