Django 4.x: Replace removed features

ugettext_lazy() and django.urls.url() are removed in 4.0.
https: //docs.djangoproject.com/en/4.0/releases/4.0/

Change-Id: I58c20b15468dfe746956e131c09e63818ff8c45d
This commit is contained in:
Corey Bryant 2022-07-19 15:40:40 -04:00
parent 32398c815a
commit ecce6298bf
9 changed files with 12 additions and 12 deletions

View File

@ -15,7 +15,7 @@
import json import json
import yaml import yaml
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.views import generic from django.views import generic
from openstack_dashboard.api.rest import urls from openstack_dashboard.api.rest import urls
from openstack_dashboard.api.rest import utils as rest_utils from openstack_dashboard.api.rest import utils as rest_utils

View File

@ -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.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
import horizon import horizon

View File

@ -10,10 +10,10 @@
# 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.conf import urls from django.urls import re_path
from horizon.browsers import views from horizon.browsers import views
urlpatterns = [ urlpatterns = [
urls.url(r'^$', views.AngularIndexView.as_view(), name='index'), re_path(r'^$', views.AngularIndexView.as_view(), name='index'),
] ]

View File

@ -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.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
import horizon import horizon

View File

@ -10,10 +10,10 @@
# 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.conf import urls from django.urls import re_path
from horizon.browsers import views from horizon.browsers import views
urlpatterns = [ urlpatterns = [
urls.url(r'^$', views.AngularIndexView.as_view(), name='index'), re_path(r'^$', views.AngularIndexView.as_view(), name='index'),
] ]

View File

@ -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.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
import horizon import horizon

View File

@ -12,11 +12,11 @@
# 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.conf import urls from django.urls import re_path
from horizon.browsers import views from horizon.browsers import views
from zaqar_ui.content.queues import panel from zaqar_ui.content.queues import panel
title = panel.Queues.name title = panel.Queues.name
urlpatterns = [ urlpatterns = [
urls.url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', views.AngularIndexView.as_view(title=title), name='index'),
] ]

View File

@ -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.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
# The slug of the panel group to be added to HORIZON_CONFIG. Required. # The slug of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'messaging' PANEL_GROUP = 'messaging'

View File

@ -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.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
# The slug of the panel group to be added to HORIZON_CONFIG. Required. # The slug of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'messaging' PANEL_GROUP = 'messaging'