Browse Source

django2: Replace django.core.urlresolves with django.urls

(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
changes/20/527320/9
Akihiro Motoki 4 years ago
parent
commit
e477eafa45
  1. 2
      horizon/base.py
  2. 10
      horizon/forms/fields.py
  3. 8
      horizon/tables/actions.py
  4. 6
      horizon/tables/base.py
  5. 2
      horizon/templatetags/branding.py
  6. 2
      horizon/test/unit/tables/test_tables.py
  7. 6
      horizon/test/unit/test_base.py
  8. 6
      horizon/workflows/base.py
  9. 2
      openstack_auth/tests/unit/test_auth.py
  10. 2
      openstack_dashboard/contrib/developer/profiler/middleware.py
  11. 2
      openstack_dashboard/dashboards/admin/aggregates/tests.py
  12. 2
      openstack_dashboard/dashboards/admin/aggregates/views.py
  13. 2
      openstack_dashboard/dashboards/admin/defaults/tests.py
  14. 2
      openstack_dashboard/dashboards/admin/flavors/tables.py
  15. 2
      openstack_dashboard/dashboards/admin/flavors/tests.py
  16. 2
      openstack_dashboard/dashboards/admin/flavors/views.py
  17. 2
      openstack_dashboard/dashboards/admin/floating_ips/forms.py
  18. 2
      openstack_dashboard/dashboards/admin/floating_ips/tests.py
  19. 4
      openstack_dashboard/dashboards/admin/floating_ips/views.py
  20. 2
      openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py
  21. 2
      openstack_dashboard/dashboards/admin/hypervisors/compute/tests.py
  22. 4
      openstack_dashboard/dashboards/admin/hypervisors/compute/views.py
  23. 2
      openstack_dashboard/dashboards/admin/hypervisors/tests.py
  24. 2
      openstack_dashboard/dashboards/admin/images/tests.py
  25. 4
      openstack_dashboard/dashboards/admin/images/views.py
  26. 6
      openstack_dashboard/dashboards/admin/info/tables.py
  27. 2
      openstack_dashboard/dashboards/admin/info/tests.py
  28. 2
      openstack_dashboard/dashboards/admin/instances/forms.py
  29. 6
      openstack_dashboard/dashboards/admin/instances/tables.py
  30. 2
      openstack_dashboard/dashboards/admin/instances/tests.py
  31. 4
      openstack_dashboard/dashboards/admin/instances/views.py
  32. 2
      openstack_dashboard/dashboards/admin/metadata_defs/forms.py
  33. 2
      openstack_dashboard/dashboards/admin/metadata_defs/tests.py
  34. 4
      openstack_dashboard/dashboards/admin/metadata_defs/views.py
  35. 2
      openstack_dashboard/dashboards/admin/networks/agents/forms.py
  36. 2
      openstack_dashboard/dashboards/admin/networks/agents/tables.py
  37. 2
      openstack_dashboard/dashboards/admin/networks/agents/tests.py
  38. 2
      openstack_dashboard/dashboards/admin/networks/agents/views.py
  39. 2
      openstack_dashboard/dashboards/admin/networks/forms.py
  40. 2
      openstack_dashboard/dashboards/admin/networks/ports/tables.py
  41. 2
      openstack_dashboard/dashboards/admin/networks/ports/tests.py
  42. 2
      openstack_dashboard/dashboards/admin/networks/ports/views.py
  43. 2
      openstack_dashboard/dashboards/admin/networks/ports/workflows.py
  44. 4
      openstack_dashboard/dashboards/admin/networks/subnets/tables.py
  45. 2
      openstack_dashboard/dashboards/admin/networks/subnets/tests.py
  46. 2
      openstack_dashboard/dashboards/admin/networks/subnets/views.py
  47. 2
      openstack_dashboard/dashboards/admin/networks/subnets/workflows.py
  48. 2
      openstack_dashboard/dashboards/admin/networks/tests.py
  49. 2
      openstack_dashboard/dashboards/admin/networks/views.py
  50. 2
      openstack_dashboard/dashboards/admin/networks/workflows.py
  51. 2
      openstack_dashboard/dashboards/admin/overview/tests.py
  52. 2
      openstack_dashboard/dashboards/admin/routers/forms.py
  53. 2
      openstack_dashboard/dashboards/admin/routers/tests.py
  54. 2
      openstack_dashboard/dashboards/admin/routers/views.py
  55. 2
      openstack_dashboard/dashboards/admin/snapshots/forms.py
  56. 2
      openstack_dashboard/dashboards/admin/snapshots/tabs.py
  57. 2
      openstack_dashboard/dashboards/admin/snapshots/tests.py
  58. 4
      openstack_dashboard/dashboards/admin/snapshots/views.py
  59. 2
      openstack_dashboard/dashboards/admin/volume_types/extras/forms.py
  60. 2
      openstack_dashboard/dashboards/admin/volume_types/extras/tables.py
  61. 2
      openstack_dashboard/dashboards/admin/volume_types/extras/tests.py
  62. 4
      openstack_dashboard/dashboards/admin/volume_types/extras/views.py
  63. 2
      openstack_dashboard/dashboards/admin/volume_types/forms.py
  64. 2
      openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
  65. 2
      openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py
  66. 2
      openstack_dashboard/dashboards/admin/volume_types/qos_specs/tests.py
  67. 2
      openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py
  68. 2
      openstack_dashboard/dashboards/admin/volume_types/tables.py
  69. 2
      openstack_dashboard/dashboards/admin/volume_types/tests.py
  70. 4
      openstack_dashboard/dashboards/admin/volume_types/views.py
  71. 2
      openstack_dashboard/dashboards/admin/volumes/forms.py
  72. 2
      openstack_dashboard/dashboards/admin/volumes/tests.py
  73. 4
      openstack_dashboard/dashboards/admin/volumes/views.py
  74. 2
      openstack_dashboard/dashboards/identity/domains/tables.py
  75. 2
      openstack_dashboard/dashboards/identity/domains/tests.py
  76. 2
      openstack_dashboard/dashboards/identity/domains/views.py
  77. 2
      openstack_dashboard/dashboards/identity/domains/workflows.py
  78. 2
      openstack_dashboard/dashboards/identity/groups/tables.py
  79. 2
      openstack_dashboard/dashboards/identity/groups/tests.py
  80. 4
      openstack_dashboard/dashboards/identity/groups/views.py
  81. 2
      openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py
  82. 2
      openstack_dashboard/dashboards/identity/identity_providers/protocols/tests.py
  83. 2
      openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py
  84. 2
      openstack_dashboard/dashboards/identity/identity_providers/tests.py
  85. 4
      openstack_dashboard/dashboards/identity/identity_providers/views.py
  86. 2
      openstack_dashboard/dashboards/identity/mappings/tests.py
  87. 4
      openstack_dashboard/dashboards/identity/mappings/views.py
  88. 2
      openstack_dashboard/dashboards/identity/projects/tables.py
  89. 2
      openstack_dashboard/dashboards/identity/projects/tests.py
  90. 2
      openstack_dashboard/dashboards/identity/projects/views.py
  91. 2
      openstack_dashboard/dashboards/identity/projects/workflows.py
  92. 2
      openstack_dashboard/dashboards/identity/roles/tests.py
  93. 4
      openstack_dashboard/dashboards/identity/roles/views.py
  94. 2
      openstack_dashboard/dashboards/identity/users/tests.py
  95. 4
      openstack_dashboard/dashboards/identity/users/views.py
  96. 2
      openstack_dashboard/dashboards/project/api_access/tests.py
  97. 2
      openstack_dashboard/dashboards/project/api_access/views.py
  98. 2
      openstack_dashboard/dashboards/project/backups/forms.py
  99. 2
      openstack_dashboard/dashboards/project/backups/tables.py
  100. 2
      openstack_dashboard/dashboards/project/backups/tabs.py

2
horizon/base.py

@ -32,7 +32,7 @@ from django.conf import settings
from django.conf.urls import include
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import empty
from django.utils.functional import SimpleLazyObject

10
horizon/forms/fields.py

@ -21,12 +21,12 @@ import six
from oslo_utils import uuidutils
from django.core.exceptions import ValidationError
from django.core import urlresolvers
from django.forms import fields
from django.forms import forms
from django.forms.utils import flatatt
from django.forms import widgets
from django.template.loader import get_template
from django import urls
from django.utils.encoding import force_text
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import Promise
@ -364,11 +364,11 @@ class DynamicSelectWidget(SelectWidget):
return self.add_item_link()
try:
if self.add_item_link_args:
return urlresolvers.reverse(self.add_item_link,
args=self.add_item_link_args)
return urls.reverse(self.add_item_link,
args=self.add_item_link_args)
else:
return urlresolvers.reverse(self.add_item_link)
except urlresolvers.NoReverseMatch:
return urls.reverse(self.add_item_link)
except urls.NoReverseMatch:
return self.add_item_link

8
horizon/tables/actions.py

@ -20,9 +20,9 @@ import logging
import types
from django.conf import settings
from django.core import urlresolvers
from django import shortcuts
from django.template.loader import render_to_string
from django import urls
from django.utils.functional import Promise
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
@ -406,10 +406,10 @@ class LinkAction(BaseAction):
try:
if datum:
obj_id = self.table.get_object_id(datum)
return urlresolvers.reverse(self.url, args=(obj_id,))
return urls.reverse(self.url, args=(obj_id,))
else:
return urlresolvers.reverse(self.url)
except urlresolvers.NoReverseMatch as ex:
return urls.reverse(self.url)
except urls.NoReverseMatch as ex:
LOG.info('No reverse found for "%(url)s": %(exception)s',
{'url': self.url, 'exception': ex})
return self.url

6
horizon/tables/base.py

@ -22,13 +22,13 @@ import sys
from django.conf import settings
from django.core import exceptions as core_exceptions
from django.core import urlresolvers
from django import forms
from django.http import HttpResponse
from django import template
from django.template.defaultfilters import slugify
from django.template.defaultfilters import truncatechars
from django.template.loader import render_to_string
from django import urls
from django.utils.html import escape
from django.utils import http
from django.utils.http import urlencode
@ -471,8 +471,8 @@ class Column(html.HTMLElement):
return self.link(datum, request=self.table.request)
return self.link(datum)
try:
return urlresolvers.reverse(self.link, args=(obj_id,))
except urlresolvers.NoReverseMatch:
return urls.reverse(self.link, args=(obj_id,))
except urls.NoReverseMatch:
return self.link
if getattr(settings, 'INTEGRATION_TESTS_SUPPORT', False):

2
horizon/templatetags/branding.py

@ -21,8 +21,8 @@ Template tags for customizing Horizon.
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django import template
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _

2
horizon/test/unit/tables/test_tables.py

@ -18,12 +18,12 @@
import unittest
import uuid
from django.core.urlresolvers import reverse
from django import forms
from django import http
from django import shortcuts
from django.template import defaultfilters
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.translation import ungettext_lazy
import mock

6
horizon/test/unit/test_base.py

@ -26,7 +26,7 @@ import django
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured
from django.core import urlresolvers
from django import urls
import horizon
from horizon import base
@ -125,7 +125,7 @@ class BaseHorizonTests(test.TestCase):
Allows URLs to be re-calculated after registering new dashboards.
Useful only for testing and should never be used on a live site.
"""
urlresolvers.clear_url_caches()
urls.clear_url_caches()
moves.reload_module(import_module(settings.ROOT_URLCONF))
base.Horizon._urls()
@ -226,7 +226,7 @@ class HorizonTests(BaseHorizonTests):
cats = horizon.get_dashboard("cats")
tigers = cats.get_panel("tigers")
tigers.index_url_name = "does_not_exist"
with self.assertRaises(urlresolvers.NoReverseMatch):
with self.assertRaises(urls.NoReverseMatch):
tigers.get_absolute_url()
tigers.index_url_name = "index"
self.assertEqual("/cats/tigers/", tigers.get_absolute_url())

6
horizon/workflows/base.py

@ -17,13 +17,13 @@ from importlib import import_module
import inspect
import logging
from django.core import urlresolvers
from django import forms
from django.forms.forms import NON_FIELD_ERRORS
from django import template
from django.template.defaultfilters import linebreaks
from django.template.defaultfilters import safe
from django.template.defaultfilters import slugify
from django import urls
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from openstack_auth import policy
@ -858,8 +858,8 @@ class Workflow(html.HTMLElement):
or a standard HTTP URL.
"""
try:
return urlresolvers.reverse(self.success_url)
except urlresolvers.NoReverseMatch:
return urls.reverse(self.success_url)
except urls.NoReverseMatch:
return self.success_url
def format_status_message(self, message):

2
openstack_auth/tests/unit/test_auth.py

@ -16,8 +16,8 @@ import uuid
import django
from django.conf import settings
from django.contrib import auth
from django.core.urlresolvers import reverse
from django import test
from django.urls import reverse
from keystoneauth1 import exceptions as keystone_exceptions
from keystoneauth1.identity import v2 as v2_auth
from keystoneauth1.identity import v3 as v3_auth

2
openstack_dashboard/contrib/developer/profiler/middleware.py

@ -15,7 +15,7 @@
from django.conf import settings
from django.core import exceptions
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils import safestring
from django.utils.translation import ugettext_lazy as _
from osprofiler import _utils as profiler_utils

2
openstack_dashboard/dashboards/admin/aggregates/tests.py

@ -12,8 +12,8 @@
import mock
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from django.utils import html
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/aggregates/views.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/defaults/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from openstack_dashboard import api

2
openstack_dashboard/dashboards/admin/flavors/tables.py

@ -17,8 +17,8 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.urls import reverse
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/admin/flavors/tests.py

@ -12,8 +12,8 @@
import django
from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from novaclient.v2 import flavors

2
openstack_dashboard/dashboards/admin/flavors/views.py

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/floating_ips/forms.py

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/floating_ips/tests.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from openstack_dashboard import api

4
openstack_dashboard/dashboards/admin/floating_ips/views.py

@ -15,8 +15,8 @@
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
import netaddr

2
openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/hypervisors/compute/tests.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from openstack_dashboard import api

4
openstack_dashboard/dashboards/admin/hypervisors/compute/views.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/hypervisors/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from openstack_dashboard import api

2
openstack_dashboard/dashboards/admin/images/tests.py

@ -13,8 +13,8 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from django.urls import reverse
import mock

4
openstack_dashboard/dashboards/admin/images/views.py

@ -22,8 +22,8 @@ from oslo_utils import units
from six.moves import builtins
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

6
openstack_dashboard/dashboards/admin/info/tables.py

@ -11,9 +11,9 @@
# under the License.
from django.conf import settings
from django.core import urlresolvers
from django import template
from django.template import defaultfilters as filters
from django import urls
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
@ -196,8 +196,8 @@ class NetworkL3AgentRoutersLinkAction(tables.LinkAction):
def get_link_url(self, datum=None):
obj_id = datum.id
return urlresolvers.reverse("horizon:admin:routers:l3_agent_list",
args=(obj_id,))
return urls.reverse("horizon:admin:routers:l3_agent_list",
args=(obj_id,))
class NetworkAgentsTable(tables.DataTable):

2
openstack_dashboard/dashboards/admin/info/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/instances/forms.py

@ -13,7 +13,7 @@
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

6
openstack_dashboard/dashboards/admin/instances/tables.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core import urlresolvers
from django.template.defaultfilters import title
from django import urls
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from keystoneclient import exceptions as keystone_exceptions
@ -209,8 +209,8 @@ class AdminInstancesTable(tables.DataTable):
def user_link(datum):
return urlresolvers.reverse("horizon:identity:users:detail",
args=(datum.user_id,))
return urls.reverse("horizon:identity:users:detail",
args=(datum.user_id,))
class AdminAuditTable(audit_tables.AuditTable):

2
openstack_dashboard/dashboards/admin/instances/tests.py

@ -15,8 +15,8 @@
from collections import OrderedDict
import uuid
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

4
openstack_dashboard/dashboards/admin/instances/views.py

@ -20,8 +20,8 @@
import futurist
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/metadata_defs/forms.py

@ -18,8 +18,8 @@ Forms for managing metadata.
"""
import json
from django.core.urlresolvers import reverse
from django.forms import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/metadata_defs/tests.py

@ -16,8 +16,8 @@
import json
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
import six

4
openstack_dashboard/dashboards/admin/metadata_defs/views.py

@ -14,8 +14,8 @@
import json
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/agents/forms.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/agents/tables.py

@ -14,8 +14,8 @@
import logging
from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/admin/networks/agents/tests.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/networks/agents/views.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/forms.py

@ -15,7 +15,7 @@
import logging
from django.conf import settings
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/ports/tables.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/ports/tests.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/networks/ports/views.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard.dashboards.admin.networks.ports \

2
openstack_dashboard/dashboards/admin/networks/ports/workflows.py

@ -15,7 +15,7 @@
import logging
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import forms

4
openstack_dashboard/dashboards/admin/networks/subnets/tables.py

@ -14,8 +14,8 @@
import logging
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/subnets/tests.py

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from horizon.workflows import views

2
openstack_dashboard/dashboards/admin/networks/subnets/views.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from openstack_dashboard.dashboards.project.networks.subnets \
import views as project_views

2
openstack_dashboard/dashboards/admin/networks/subnets/workflows.py

@ -14,7 +14,7 @@
import logging
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/tests.py

@ -13,8 +13,8 @@
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from django.utils.http import urlunquote
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/networks/views.py

@ -15,7 +15,7 @@
from collections import OrderedDict
from django.conf import settings
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/networks/workflows.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from openstack_dashboard.dashboards.admin.networks import forms \
as networks_forms

2
openstack_dashboard/dashboards/admin/overview/tests.py

@ -18,9 +18,9 @@
import datetime
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.urls import reverse
from django.utils import encoding
from django.utils import timezone

2
openstack_dashboard/dashboards/admin/routers/forms.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from openstack_dashboard.dashboards.project.routers import forms as r_forms

2
openstack_dashboard/dashboards/admin/routers/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/routers/views.py

@ -17,7 +17,7 @@ Views for managing Neutron Routers.
"""
from django.conf import settings
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/snapshots/forms.py

@ -11,7 +11,7 @@
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/snapshots/tabs.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import tabs

2
openstack_dashboard/dashboards/admin/snapshots/tests.py

@ -11,9 +11,9 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.http import urlunquote
from mox3.mox import IsA

4
openstack_dashboard/dashboards/admin/snapshots/views.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volume_types/extras/forms.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard import api

2
openstack_dashboard/dashboards/admin/volume_types/extras/tables.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/admin/volume_types/extras/tests.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

4
openstack_dashboard/dashboards/admin/volume_types/extras/views.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volume_types/forms.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.forms import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/admin/volume_types/qos_specs/tests.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

2
openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volume_types/tables.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/admin/volume_types/tests.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA
from horizon import exceptions

4
openstack_dashboard/dashboards/admin/volume_types/views.py

@ -15,8 +15,8 @@ Admin views for managing volumes.
"""
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volumes/forms.py

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/admin/volumes/tests.py

@ -15,8 +15,8 @@
import copy
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.http import urlunquote
import mock

4
openstack_dashboard/dashboards/admin/volumes/views.py

@ -18,8 +18,8 @@ Admin views for managing volumes and snapshots.
from collections import OrderedDict
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/identity/domains/tables.py

@ -15,8 +15,8 @@
import logging
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.urls import reverse
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/identity/domains/tests.py

@ -13,8 +13,8 @@
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

2
openstack_dashboard/dashboards/identity/domains/views.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/identity/domains/workflows.py

@ -15,7 +15,7 @@
import logging
from django.conf import settings
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from openstack_auth import utils

2
openstack_dashboard/dashboards/identity/groups/tables.py

@ -14,8 +14,8 @@
import logging
from django.core.urlresolvers import reverse
from django.template import defaultfilters
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/identity/groups/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

4
openstack_dashboard/dashboards/identity/groups/views.py

@ -13,8 +13,8 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/identity/identity_providers/protocols/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

2
openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import forms

2
openstack_dashboard/dashboards/identity/identity_providers/tests.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

4
openstack_dashboard/dashboards/identity/identity_providers/views.py

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/identity/mappings/tests.py

@ -14,8 +14,8 @@
import json
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IgnoreArg
from mox3.mox import IsA

4
openstack_dashboard/dashboards/identity/mappings/views.py

@ -14,8 +14,8 @@
import json
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

2
openstack_dashboard/dashboards/identity/projects/tables.py

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.urls import reverse
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

2
openstack_dashboard/dashboards/identity/projects/tests.py

@ -18,9 +18,9 @@ import os
import unittest
import django
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from django.urls import reverse
from django.utils import timezone
from mox3.mox import IgnoreArg