horizon/horizon/workflows
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 hacking: noqa cleanup in horizon 2017-03-17 19:38:47 +00:00
base.py Switch render() arguments to the new way 2017-06-21 19:32:03 +00:00
views.py Fix H405 (multi line docstring) warnings (horizon) 2017-06-09 16:04:57 +00:00