summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2018-05-14 02:18:54 +0900
committerAkihiro Motoki <amotoki@gmail.com>2018-05-14 02:34:28 +0900
commit6bf20357fe7ac21d71f717bbe3f13b87c43bb65a (patch)
tree4d823db1563a3d377164d63f2506d1738a6e7f24
parentf2feb0f0565dd287465dd2a97e61d7d8e9e1b14e (diff)
Django 2.0 support
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 deprecated in Django 1.10: https://docs.djangoproject.com/en/2.0/releases/1.10/#id3 Note that this commit does not add py35dj20 like other horizon plugins because there is no actual python unit tests in freezer-web-ui. Older Django unit tests were dropped from tox.ini as horizon dropped Django <=1.10 support in Rocky. Change-Id: I38f3f05655324f2a5f38c6e8c6ab53ebaa42d4c8
Notes
Notes (review): Code-Review+1: Matthias Bastian <bastian@strato.de> Code-Review+2: Saad Zaher <eng.szaher@gmail.com> Workflow+1: Saad Zaher <eng.szaher@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 15 May 2018 09:44:15 +0000 Reviewed-on: https://review.openstack.org/568130 Project: openstack/freezer-web-ui Branch: refs/heads/master
-rw-r--r--disaster_recovery/actions/tables.py2
-rw-r--r--disaster_recovery/actions/views.py2
-rw-r--r--disaster_recovery/backups/tables.py2
-rw-r--r--disaster_recovery/clients/tables.py2
-rw-r--r--disaster_recovery/jobs/tables.py2
-rw-r--r--disaster_recovery/sessions/tables.py2
-rw-r--r--disaster_recovery/sessions/workflows/attach.py2
-rw-r--r--disaster_recovery/sessions/workflows/create.py2
-rw-r--r--disaster_recovery/utils.py2
-rw-r--r--tox.ini13
10 files changed, 10 insertions, 21 deletions
diff --git a/disaster_recovery/actions/tables.py b/disaster_recovery/actions/tables.py
index 14f918d..c507813 100644
--- a/disaster_recovery/actions/tables.py
+++ b/disaster_recovery/actions/tables.py
@@ -15,7 +15,7 @@ from django.utils.translation import ugettext_lazy as _
15from django.utils.translation import ungettext_lazy 15from django.utils.translation import ungettext_lazy
16 16
17from horizon import tables 17from horizon import tables
18from django.core.urlresolvers import reverse 18from django.urls import reverse
19 19
20import disaster_recovery.api.api as freezer_api 20import disaster_recovery.api.api as freezer_api
21 21
diff --git a/disaster_recovery/actions/views.py b/disaster_recovery/actions/views.py
index 2c57f76..4564425 100644
--- a/disaster_recovery/actions/views.py
+++ b/disaster_recovery/actions/views.py
@@ -12,7 +12,7 @@
12 12
13import pprint 13import pprint
14 14
15from django.core.urlresolvers import reverse_lazy 15from django.urls import reverse_lazy
16from django.utils.translation import ugettext_lazy as _ 16from django.utils.translation import ugettext_lazy as _
17from django.views import generic 17from django.views import generic
18 18
diff --git a/disaster_recovery/backups/tables.py b/disaster_recovery/backups/tables.py
index 7d702c5..5aaae31 100644
--- a/disaster_recovery/backups/tables.py
+++ b/disaster_recovery/backups/tables.py
@@ -12,7 +12,7 @@
12# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
13# limitations under the License. 13# limitations under the License.
14 14
15from django.core.urlresolvers import reverse 15from django.urls import reverse
16from django.utils import safestring 16from django.utils import safestring
17from django.utils.translation import ungettext_lazy 17from django.utils.translation import ungettext_lazy
18from django.utils.translation import ugettext_lazy as _ 18from django.utils.translation import ugettext_lazy as _
diff --git a/disaster_recovery/clients/tables.py b/disaster_recovery/clients/tables.py
index faccd13..7586134 100644
--- a/disaster_recovery/clients/tables.py
+++ b/disaster_recovery/clients/tables.py
@@ -14,7 +14,7 @@ from django.utils.translation import ugettext_lazy as _
14from django.utils.translation import ungettext_lazy 14from django.utils.translation import ungettext_lazy
15 15
16from horizon import tables 16from horizon import tables
17from django.core.urlresolvers import reverse 17from django.urls import reverse
18 18
19import disaster_recovery.api.api as freezer_api 19import disaster_recovery.api.api as freezer_api
20from disaster_recovery.utils import shield 20from disaster_recovery.utils import shield
diff --git a/disaster_recovery/jobs/tables.py b/disaster_recovery/jobs/tables.py
index 1cb09f4..e24ed55 100644
--- a/disaster_recovery/jobs/tables.py
+++ b/disaster_recovery/jobs/tables.py
@@ -18,7 +18,7 @@ from django.utils.translation import ungettext_lazy
18 18
19from horizon import tables 19from horizon import tables
20from horizon import messages 20from horizon import messages
21from django.core.urlresolvers import reverse 21from django.urls import reverse
22 22
23import disaster_recovery.api.api as freezer_api 23import disaster_recovery.api.api as freezer_api
24from disaster_recovery.utils import shield 24from disaster_recovery.utils import shield
diff --git a/disaster_recovery/sessions/tables.py b/disaster_recovery/sessions/tables.py
index 7efc105..bf168a5 100644
--- a/disaster_recovery/sessions/tables.py
+++ b/disaster_recovery/sessions/tables.py
@@ -14,7 +14,7 @@
14 14
15from django.utils.translation import ugettext_lazy as _ 15from django.utils.translation import ugettext_lazy as _
16from django.utils.translation import ungettext_lazy 16from django.utils.translation import ungettext_lazy
17from django.core.urlresolvers import reverse 17from django.urls import reverse
18 18
19from horizon import tables 19from horizon import tables
20 20
diff --git a/disaster_recovery/sessions/workflows/attach.py b/disaster_recovery/sessions/workflows/attach.py
index f22186c..be805a0 100644
--- a/disaster_recovery/sessions/workflows/attach.py
+++ b/disaster_recovery/sessions/workflows/attach.py
@@ -13,7 +13,7 @@
13# limitations under the License. 13# limitations under the License.
14 14
15from django.utils.translation import ugettext_lazy as _ 15from django.utils.translation import ugettext_lazy as _
16from django.core.urlresolvers import reverse 16from django.urls import reverse
17 17
18from horizon import exceptions 18from horizon import exceptions
19from horizon import forms 19from horizon import forms
diff --git a/disaster_recovery/sessions/workflows/create.py b/disaster_recovery/sessions/workflows/create.py
index ddb1608..ac39bc6 100644
--- a/disaster_recovery/sessions/workflows/create.py
+++ b/disaster_recovery/sessions/workflows/create.py
@@ -14,7 +14,7 @@
14 14
15import datetime 15import datetime
16 16
17from django.core.urlresolvers import reverse 17from django.urls import reverse
18from django.utils.translation import ugettext_lazy as _ 18from django.utils.translation import ugettext_lazy as _
19 19
20 20
diff --git a/disaster_recovery/utils.py b/disaster_recovery/utils.py
index 862d3f6..2d7e717 100644
--- a/disaster_recovery/utils.py
+++ b/disaster_recovery/utils.py
@@ -17,7 +17,7 @@ import re
17 17
18from functools import wraps 18from functools import wraps
19 19
20from django.core.urlresolvers import reverse 20from django.urls import reverse
21from django.template.defaultfilters import date as django_date 21from django.template.defaultfilters import date as django_date
22from django.utils.translation import ugettext_lazy as _ 22from django.utils.translation import ugettext_lazy as _
23 23
diff --git a/tox.ini b/tox.ini
index 3acd885..34ab123 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
1[tox] 1[tox]
2envlist = py27,py27dj18,pep8,py35,py35dj18,pylint 2envlist = py27,pep8,py35,pylint
3minversion = 1.6 3minversion = 1.6
4skipsdist = True 4skipsdist = True
5 5
@@ -25,17 +25,6 @@ commands = {posargs}
25[testenv:cover] 25[testenv:cover]
26commands = python setup.py test --coverage --testr-args='{posargs}' 26commands = python setup.py test --coverage --testr-args='{posargs}'
27 27
28[testenv:py27dj18]
29basepython = python2.7
30commands =
31 python manage.py test {posargs}
32
33
34[testenv:py35dj18]
35basepython = python3.5
36commands =
37 python manage.py test {posargs}
38
39[testenv:docs] 28[testenv:docs]
40setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings 29setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings
41commands = python setup.py build_sphinx 30commands = python setup.py build_sphinx