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:
parent
32398c815a
commit
ecce6298bf
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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'),
|
||||||
]
|
]
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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'),
|
||||||
]
|
]
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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'),
|
||||||
]
|
]
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user