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 Add py35dj20 job to test Django 2.0 integration. Also drops older Django unit tests from tox.ini as horizon dropped Django <=1.10 support in Rocky. Change-Id: I099c7b019c930307d3aae64b1729d6f532fc1653
This commit is contained in:
parent
4a468edaaf
commit
cff0dc4884
|
@ -4,8 +4,14 @@
|
||||||
- openstack-tox-lower-constraints:
|
- openstack-tox-lower-constraints:
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/horizon
|
- openstack/horizon
|
||||||
|
- horizon-openstack-tox-py35dj20:
|
||||||
|
required-projects:
|
||||||
|
openstack/horizon
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-lower-constraints:
|
- openstack-tox-lower-constraints:
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/horizon
|
- openstack/horizon
|
||||||
|
- horizon-openstack-tox-py35dj20:
|
||||||
|
required-projects:
|
||||||
|
openstack/horizon
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 ugettext_lazy as _
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
import mock
|
import mock
|
||||||
from openstack_dashboard import api
|
from openstack_dashboard import api
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 django.utils.translation import ugettext_lazy as _
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 ugettext_lazy as _
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
import mock
|
import mock
|
||||||
import pytz
|
import pytz
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.urls import reverse
|
||||||
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 horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
28
tox.ini
28
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py27,py27dj18,pep8
|
envlist = py35,py27,pep8
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
|
@ -30,29 +30,11 @@ commands =
|
||||||
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
|
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
|
||||||
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
|
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
|
||||||
|
|
||||||
[testenv:py27dj18]
|
[testenv:py35dj20]
|
||||||
basepython = python2.7
|
basepython = python3.5
|
||||||
commands =
|
commands =
|
||||||
pip install django>=1.8,<1.9
|
pip install django>=2.0,<2.1
|
||||||
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
|
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
|
||||||
|
|
||||||
[testenv:py27dj19]
|
|
||||||
basepython = python2.7
|
|
||||||
commands =
|
|
||||||
pip install django>=1.9,<1.10
|
|
||||||
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
|
|
||||||
|
|
||||||
[testenv:py27dj110]
|
|
||||||
basepython = python2.7
|
|
||||||
commands =
|
|
||||||
pip install django>=1.10,<1.11
|
|
||||||
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
|
|
||||||
|
|
||||||
[testenv:py27dj111]
|
|
||||||
basepython = python2.7
|
|
||||||
commands =
|
|
||||||
pip install django>=1.11,<2.0
|
|
||||||
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
|
|
||||||
|
|
||||||
[testenv:eslint]
|
[testenv:eslint]
|
||||||
whitelist_externals = npm
|
whitelist_externals = npm
|
||||||
|
|
Loading…
Reference in New Issue