Import reverse from django.urls rather than django.core.urlresolvers

Starting with Django 2 (which is the python3 version), the reverse and
reverse_lazy functions are located in the django.urls module rather than
django.core.urlresolvers. In Django>=1.10 (horizon depends on 1.11), these
functions are available in django.urls. This commit aims at improving the
python3 compatibility.

Change-Id: I8e8d281c7cac21c4b5771d2430f7d376b7e8c46a
This commit is contained in:
Luka Peschke 2019-02-01 11:23:58 +01:00
parent a3484eb744
commit 2cff4cb554
7 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@
# under the License.
from collections import OrderedDict
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

View File

@ -13,8 +13,8 @@
# 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 forms
from horizon import tables

View File

@ -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

View File

@ -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 forms
from horizon import tables

View File

@ -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

View File

@ -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 forms
from horizon import tables

View File

@ -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 tables