From f2b2289b4abb0c6e83d229304bf12370d5166109 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Mon, 14 Sep 2015 14:24:47 +0100 Subject: [PATCH] Drop Django 1.7 support Django 1.7 support ends in December 2015 (https://www.djangoproject.com/download/#supported-versions), so it will not be supported by Mitaka release. This patch removes many of the deprecation warnings:- `RedirectView.permanent` change: https://docs.djangoproject.com/en/1.8/ref/class-based-views/base/ `url` change: https://docs.djangoproject.com/en/1.8/internals/deprecation/ See version 1.5 notes for the url and ssi template tag change `django.forms.utils` change: https://docs.djangoproject.com/en/1.8/internals/deprecation/ See version 1.9 notes `firstof` change: https://docs.djangoproject.com/en/1.8/internals/deprecation/ See version 1.8 notes for cycle and firstof template tags Change-Id: If546c087e73d189daa92e5bd63f0533fcf19089f Partially-Implements: blueprint drop-dj17 --- horizon/forms/fields.py | 2 +- horizon/templates/auth/_login.html | 1 - horizon/templates/horizon/_script_i18n.html | 1 - horizon/templates/horizon/_sidebar.html | 1 - horizon/templates/horizon/common/_breadcrumb.html | 1 - horizon/templates/horizon/common/_data_table.html | 1 - horizon/templates/horizon/common/_region_selector.html | 1 - horizon/templates/horizon/common/_sidebar.html | 1 - horizon/templates/horizon/jasmine/jasmine.html | 1 - horizon/utils/html.py | 2 +- .../data_processing.cluster_templates/_details.html | 1 - .../_nodegroups_details.html | 1 - .../data_processing.cluster_templates/_upload_file.html | 3 +-- .../data_processing.clusters/_create_cluster.html | 1 - .../templates/data_processing.clusters/_details.html | 1 - .../data_processing.clusters/_nodegroups_details.html | 1 - .../data_processing.data_image_registry/_edit_tags.html | 3 +-- .../_register_image.html | 3 +-- .../templates/data_processing.job_binaries/_create.html | 1 - .../templates/data_processing.job_executions/_details.html | 2 +- .../jobs/templates/data_processing.jobs/_details.html | 1 - .../data_processing.nodegroup_templates/_details.html | 1 - .../templates/data_processing.wizard/_job_type_select.html | 3 +-- .../templates/data_processing.wizard/_plugin_select.html | 3 +-- .../templates/data_processing.wizard/cluster_guide.html | 1 - .../templates/data_processing.wizard/jobex_guide.html | 1 - .../wizard/templates/data_processing.wizard/wizard.html | 1 - .../contrib/sahara/content/data_processing/wizard/views.py | 2 ++ .../databases/templates/databases/_detail_overview.html | 1 - .../databases/templates/databases/_resize_instance.html | 1 - .../databases/templates/databases/_resize_volume.html | 1 - .../admin/aggregates/templates/aggregates/_update.html | 1 - .../templates/hypervisors/compute/_disable_service.html | 1 - .../templates/hypervisors/compute/_evacuate_host.html | 1 - .../templates/hypervisors/compute/_migrate_host.html | 1 - .../admin/instances/templates/instances/_live_migrate.html | 1 - .../metadata_defs/templates/metadata_defs/_create.html | 1 - .../templates/metadata_defs/_resource_types.html | 1 - .../admin/metering/templates/metering/_daily.html | 1 - .../admin/metering/templates/metering/stats.html | 1 - .../admin/networks/templates/networks/_create.html | 1 - .../templates/networks/ports/_detail_overview.html | 1 - .../templates/volumes/snapshots/_detail_overview.html | 1 - .../volumes/volume_types/_update_volume_type.html | 1 - .../templates/volumes/volume_types/extras/_index.html | 1 - .../templates/volumes/volume_types/qos_specs/_index.html | 3 +-- .../identity/groups/templates/groups/_add_non_member.html | 1 - .../access_and_security/api_access/_credentials.html | 1 - .../templates/access_and_security/keypairs/download.html | 1 - .../containers/templates/containers/_container_detail.html | 1 - .../project/containers/templates/containers/_copy.html | 1 - .../project/containers/templates/containers/_create.html | 1 - .../templates/containers/_create_pseudo_folder.html | 1 - .../containers/templates/containers/_object_detail.html | 1 - .../project/containers/templates/containers/_update.html | 1 - .../project/containers/templates/containers/_upload.html | 1 - .../project/containers/templates/containers/index.html | 1 - .../firewalls/templates/firewalls/_firewall_details.html | 1 - .../firewalls/templates/firewalls/_policy_details.html | 1 - .../firewalls/templates/firewalls/_rule_details.html | 1 - .../instances/templates/instances/_decryptpassword.html | 1 - .../instances/templates/instances/_detail_console.html | 1 - .../project/instances/templates/instances/_detail_log.html | 1 - .../instances/templates/instances/_detail_overview.html | 1 - .../project/instances/templates/instances/_rebuild.html | 1 - .../instances/templates/instances/serial_console.html | 3 +-- .../templates/network_topology/_create_router.html | 1 - .../templates/network_topology/iframe.html | 2 -- .../network_topology/templates/network_topology/index.html | 1 - .../project/networks/templates/networks/_create.html | 1 - .../project/networks/templates/networks/create.html | 1 - .../templates/networks/ports/_detail_overview.html | 1 - .../templates/networks/subnets/_detail_overview.html | 1 - .../templates/routers/extensions/routerroutes/_create.html | 1 - .../templates/routers/extensions/routerrules/_create.html | 1 - .../project/routers/templates/routers/ports/_create.html | 1 - .../routers/templates/routers/ports/_setgateway.html | 1 - .../project/stacks/templates/stacks/_preview_details.html | 1 - .../templates/volumes/backups/_detail_overview.html | 1 - .../templates/volumes/snapshots/_detail_overview.html | 1 - .../project/volumes/templates/volumes/volumes/_attach.html | 1 - .../templates/volumes/volumes/_create_snapshot.html | 1 - .../templates/volumes/volumes/_detail_overview.html | 1 - .../vpn/templates/vpn/_ipsecsiteconnection_details.html | 1 - .../project/vpn/templates/vpn/_vpnservice_details.html | 1 - openstack_dashboard/templates/403.html | 1 - openstack_dashboard/templates/404.html | 1 - openstack_dashboard/templates/_header.html | 1 - .../templates/context_selection/_project_list.html | 1 - .../templates/context_selection/_region_list.html | 1 - openstack_dashboard/templates/horizon/_script_i18n.html | 1 - openstack_dashboard/templates/horizon/_scripts.html | 2 -- openstack_dashboard/themes/material/templates/_header.html | 1 - .../themes/material/templates/horizon/_sidebar.html | 1 - tox.ini | 7 +------ 95 files changed, 13 insertions(+), 108 deletions(-) diff --git a/horizon/forms/fields.py b/horizon/forms/fields.py index 1ffb321db6..c1afaa0f02 100644 --- a/horizon/forms/fields.py +++ b/horizon/forms/fields.py @@ -20,7 +20,7 @@ import six from django.core.exceptions import ValidationError # noqa from django.core import urlresolvers from django.forms import fields -from django.forms.util import flatatt # noqa +from django.forms.utils import flatatt # noqa from django.forms import widgets from django.utils.encoding import force_text from django.utils.functional import Promise # noqa diff --git a/horizon/templates/auth/_login.html b/horizon/templates/auth/_login.html index cf8a5a07f7..a47f31d1c9 100644 --- a/horizon/templates/auth/_login.html +++ b/horizon/templates/auth/_login.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block modal-header %}{% trans "Log In" %}{% endblock %} {% block modal_class %}login {% if hide %}modal{% endif %}{% endblock %} diff --git a/horizon/templates/horizon/_script_i18n.html b/horizon/templates/horizon/_script_i18n.html index 54eb3c2f62..ea5f90d7bd 100644 --- a/horizon/templates/horizon/_script_i18n.html +++ b/horizon/templates/horizon/_script_i18n.html @@ -1,3 +1,2 @@ -{% load url from future %} {% comment %} Django's JavaScript i18n Implementation {% endcomment %} diff --git a/horizon/templates/horizon/_sidebar.html b/horizon/templates/horizon/_sidebar.html index 99b801769c..3cac6fecc0 100644 --- a/horizon/templates/horizon/_sidebar.html +++ b/horizon/templates/horizon/_sidebar.html @@ -1,5 +1,4 @@ {% load horizon i18n %} -{% load url from future %}