Make compatible with Django 1.10 and 1.11
Removes use of future tag (not available in Django 1.10+). Flatten Context into dict for render (necessary for Django 1.11+). Both changes compatible with Django >= 1.8. Change-Id: I5db4af45208423753dd5d60616ee781e6471b9e6 Closes-bug: 1816707
This commit is contained in:
parent
f402ba1ce9
commit
f78c7dd683
@ -1,6 +1,5 @@
|
||||
{% extends "horizon/common/_modal_form.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block form_id %}create_datasource_form{% endblock %}
|
||||
{% block form_action %}{% url 'horizon:admin:datasources:create' %}{% endblock %}
|
||||
|
@ -79,7 +79,7 @@ class CreateOutput(workflows.Step):
|
||||
columns_list = policy_columns.split(', ')
|
||||
context['policy_columns_list'] = columns_list
|
||||
context['policy_columns_count'] = len(columns_list)
|
||||
return step_template.render(context)
|
||||
return step_template.render(context.flatten())
|
||||
|
||||
|
||||
class CreateConditionsAction(workflows.Action):
|
||||
@ -170,7 +170,7 @@ class CreateConditions(workflows.Step):
|
||||
context['column_pattern_error'] = COLUMN_PATTERN_ERROR
|
||||
context['table_pattern'] = TABLE_PATTERN
|
||||
context['table_pattern_error'] = TABLE_PATTERN_ERROR
|
||||
return step_template.render(context)
|
||||
return step_template.render(context.flatten())
|
||||
|
||||
|
||||
def _underscore_slugify(name):
|
||||
|
@ -1,6 +1,5 @@
|
||||
{% extends "horizon/common/_modal_form.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block form_id %}create_policy_form{% endblock %}
|
||||
{% block form_action %}{% url 'horizon:admin:policies:create' %}{% endblock %}
|
||||
|
@ -1,6 +1,5 @@
|
||||
{% extends "horizon/common/_modal_form.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block form_id %}create_raw_rule_form{% endblock %}
|
||||
{% block form_action %}{% url 'horizon:admin:policies:create_raw_rule' policy_name %}{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user