Port away from django.core.urlresolves to django.urls

The old location was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
and totally removed from Django 2.0.

Change-Id: Iacbf13df35befebcc0a86784b380c2ac694516e8
This commit is contained in:
Luigi Toscano 2018-03-11 16:05:35 +01:00
parent 75beaf42b2
commit da5df29dfe
25 changed files with 33 additions and 33 deletions

View File

@ -11,9 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core import urlresolvers
from django import http as http_response
from django.template import defaultfilters as filters
from django import urls
from django.utils import http
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
@ -45,7 +45,7 @@ class CreateCluster(tables.LinkAction):
icon = "plus"
def get_link_url(self, datum):
base_url = urlresolvers.reverse(self.url)
base_url = urls.reverse(self.url)
params = http.urlencode({"hadoop_version": datum.hadoop_version,
"plugin_name": datum.plugin_name,

View File

@ -12,8 +12,8 @@
import copy
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA # noqa
from oslo_serialization import jsonutils
import six

View File

@ -11,8 +11,8 @@
# See the 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

View File

@ -13,7 +13,7 @@
import json
from django.core import urlresolvers
from django import urls
from django.utils.translation import ugettext_lazy as _
from saharaclient.api import base as api_base
@ -66,7 +66,7 @@ class CreateClusterTemplate(workflows.Workflow):
default_steps = (SelectPlugin, )
def get_success_url(self):
url = urlresolvers.reverse(self.success_url)
url = urls.reverse(self.success_url)
return url

View File

@ -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 # noqa
from oslo_serialization import jsonutils

View File

@ -13,8 +13,8 @@
import json
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.views.generic import base as django_base
from oslo_utils import timeutils

View File

@ -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 # noqa
from openstack_dashboard import api as dash_api

View File

@ -14,7 +14,7 @@
from collections import OrderedDict
import json
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

View File

@ -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
import mock
from mox3.mox import IgnoreArg # noqa
from mox3.mox import IsA # noqa

View File

@ -11,8 +11,8 @@
# See the 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

View File

@ -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 sahara_dashboard import api
from sahara_dashboard.test import helpers as test

View File

@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core.urlresolvers import reverse_lazy
from django import http
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.views import generic

View File

@ -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 # noqa
import six

View File

@ -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 # noqa
import six

View File

@ -11,7 +11,7 @@
# See the 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

View File

@ -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 # noqa
import six

View File

@ -11,9 +11,9 @@
# See the 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 import http
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
import django.views

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core import urlresolvers
from django import urls
from django.utils import http
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
@ -69,7 +69,7 @@ class LaunchJobExistingCluster(tables.LinkAction):
classes = ('ajax-modal', 'btn-launch')
def get_link_url(self, datum):
base_url = urlresolvers.reverse(self.url)
base_url = urls.reverse(self.url)
params = http.urlencode({"job_id": datum.id})
return "?".join([base_url, params])
@ -82,7 +82,7 @@ class LaunchJobNewCluster(tables.LinkAction):
classes = ('ajax-modal', 'btn-launch')
def get_link_url(self, datum):
base_url = urlresolvers.reverse(self.url)
base_url = urls.reverse(self.url)
params = http.urlencode({"job_id": datum.id})
return "?".join([base_url, params])
@ -95,7 +95,7 @@ class ChoosePlugin(tables.LinkAction):
classes = ('ajax-modal', 'btn-launch')
def get_link_url(self, datum):
base_url = urlresolvers.reverse(self.url)
base_url = urls.reverse(self.url)
params = http.urlencode({"job_id": datum.id})
return "?".join([base_url, params])

View File

@ -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 # noqa
import six

View File

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

View File

@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core.urlresolvers import reverse
from django.http import Http404 # noqa
from django.urls import reverse
from django.utils import http
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _

View File

@ -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 # noqa
import six

View File

@ -11,7 +11,7 @@
# See the 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

View File

@ -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 sahara_dashboard.test import helpers as test

View File

@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core.urlresolvers import reverse_lazy
from django import http
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.views import generic