Files
masakari-dashboard/masakaridashboard/segments/panel.py
Vadym Markov eb4d103c3f Django 4.x: fix some import error
* ugettext_lazy is removed

In Django 3.0 ugettext_lazy/ungettext_lazy have been deprecated in favor
of gettext_lazy/ngettext_lazy [0].

* urlunquote is removed

In Django 3.0 django.utils.http.urlquote/urlquote_plus/urlunquote/urlunquote
have been deprecated in favor of the functions that they're aliases for:
urllib.parse.quote/quote_plus/unquote/unquote_plus [0].

We are now using Django 4.2, so we should update our code
with the gettext_lazy/ngettext_lazy aliases.

[0] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3

Change-Id: I2fe090fe170dd832deb9cf454a0400303d2e3d92
2024-01-24 15:06:50 +08:00

29 lines
867 B
Python

# Copyright (C) 2018 NTT DATA
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django.utils.translation import gettext_lazy as _
import horizon
from masakaridashboard import dashboard
class Segment(horizon.Panel):
name = _("Segments")
slug = 'segments'
dashboard.MasakariDashboard.register(Segment)