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.

Change-Id: If4cb1ed6e1a15dc7acb7e9f3d8e564c23c9326c1
This commit is contained in:
Akihiro Motoki 2018-05-15 06:13:33 +09:00 committed by Shu Muto
parent 2e2dec2400
commit 56ca3fb094
19 changed files with 26 additions and 20 deletions

View File

@ -2,6 +2,12 @@
check:
jobs:
- openstack-tox-lower-constraints
- horizon-openstack-tox-py35dj20:
required-projects:
openstack/horizon
gate:
jobs:
- openstack-tox-lower-constraints
- horizon-openstack-tox-py35dj20:
required-projects:
openstack/horizon

View File

@ -13,7 +13,7 @@
import six
import yaml
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,9 +10,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.template import defaultfilters
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

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

View File

@ -10,8 +10,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 senlin_dashboard.api import senlin

View File

@ -13,7 +13,7 @@
import six
import yaml
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 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import pgettext_lazy
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 import http
from django.urls import reverse
from mox3.mox import IsA

View File

@ -12,7 +12,7 @@
import yaml
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

@ -17,8 +17,8 @@ Forms for managing policies.
import six
import yaml
from django.core.urlresolvers import reverse
from django.forms import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

View File

@ -12,8 +12,8 @@
import yaml
from django.core.urlresolvers import reverse
from django import http
from django.urls import reverse
from mox3.mox import IsA

View File

@ -12,7 +12,7 @@
import yaml
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from senlin_dashboard.api import senlin

View File

@ -19,8 +19,8 @@ import yaml
from senlinclient.common import utils
from django.core.urlresolvers import reverse
from django.forms import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

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 import http
from django.urls import reverse
from mox3.mox import IsA

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations 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 horizon import exceptions

View File

@ -17,8 +17,8 @@ Forms for managing receivers.
import six
import yaml
from django.core.urlresolvers import reverse
from django.forms import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations 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 ungettext_lazy

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

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations 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 horizon import exceptions