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
This commit is contained in:
parent
f2feb0f056
commit
6bf20357fe
@ -15,7 +15,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ungettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
import disaster_recovery.api.api as freezer_api
|
import disaster_recovery.api.api as freezer_api
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
from django.utils import safestring
|
from django.utils import safestring
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ungettext_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
@ -14,7 +14,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ungettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
import disaster_recovery.api.api as freezer_api
|
import disaster_recovery.api.api as freezer_api
|
||||||
from disaster_recovery.utils import shield
|
from disaster_recovery.utils import shield
|
||||||
|
@ -18,7 +18,7 @@ from django.utils.translation import ungettext_lazy
|
|||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
import disaster_recovery.api.api as freezer_api
|
import disaster_recovery.api.api as freezer_api
|
||||||
from disaster_recovery.utils import shield
|
from disaster_recovery.utils import shield
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ungettext_lazy
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import re
|
|||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
from django.template.defaultfilters import date as django_date
|
from django.template.defaultfilters import date as django_date
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
13
tox.ini
13
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27,py27dj18,pep8,py35,py35dj18,pylint
|
envlist = py27,pep8,py35,pylint
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@ -25,17 +25,6 @@ commands = {posargs}
|
|||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:py27dj18]
|
|
||||||
basepython = python2.7
|
|
||||||
commands =
|
|
||||||
python manage.py test {posargs}
|
|
||||||
|
|
||||||
|
|
||||||
[testenv:py35dj18]
|
|
||||||
basepython = python3.5
|
|
||||||
commands =
|
|
||||||
python manage.py test {posargs}
|
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings
|
setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user