1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 07:35:22 +00:00

Merge pull request #369 from Real-Gecko/master

replaced ugettext_lazy with gettext_lazy
This commit is contained in:
catborise 2020-10-14 18:50:13 +03:00 committed by GitHub
commit 9e56378682
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 40 additions and 39 deletions

View file

@ -1,7 +1,7 @@
from appsettings.settings import app_settings
from django.contrib.auth import get_user_model
from django.forms import ModelForm, ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from .models import UserInstance, UserSSHKey
from .utils import validate_ssh_key

View file

@ -1,7 +1,7 @@
from django.contrib.auth.models import User
from django.core.validators import MinValueValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from instances.models import Instance

View file

@ -3,7 +3,7 @@ from django.contrib.auth.models import Group, User
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.urls import reverse_lazy
from django.utils.text import format_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from accounts.models import UserAttributes

View file

@ -5,7 +5,7 @@ from django.contrib.auth.forms import AdminPasswordChangeForm
from django.contrib.auth.models import Group, User
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect, render
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from accounts.models import UserAttributes, UserInstance, Instance
from appsettings.settings import app_settings

View file

@ -1,7 +1,8 @@
# Generated by Django 2.2.12 on 2020-05-23 12:05
from django.db import migrations
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
def add_default_settings(apps, schema_editor):
setting = apps.get_model("appsettings", "AppSettings")

View file

@ -1,7 +1,7 @@
# Generated by Django 2.2.13 on 2020-07-16 06:37
from django.db import migrations
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
def add_default_settings(apps, schema_editor):

View file

@ -1,5 +1,6 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class AppSettings(models.Model):

View file

@ -4,7 +4,7 @@ import os
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.decorators import login_required
from django.contrib import messages
@ -90,4 +90,3 @@ def appsettings(request):
return HttpResponseRedirect(request.get_full_path())
return render(request, 'appsettings.html', locals())

View file

@ -1,6 +1,6 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from computes.models import Compute
from vrtManager.connection import CONN_TCP, CONN_SSH, CONN_TLS, CONN_SOCKET
from .validators import validate_hostname

View file

@ -1,6 +1,6 @@
from django.db.models import CharField, IntegerField, Model
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import virConnect
from vrtManager.connection import connection_manager

View file

@ -1,6 +1,6 @@
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
import re
have_symbol = re.compile('[^a-zA-Z0-9._-]+')

View file

@ -1,7 +1,7 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from appsettings.models import AppSettings
from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES, QEMU_KEYMAPS

View file

@ -1,6 +1,6 @@
from django.db import models
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import VIR_DOMAIN_XML_SECURE
from computes.models import Compute

View file

@ -5,7 +5,7 @@ from collections import OrderedDict
from django.conf import settings
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from accounts.models import UserInstance
from appsettings.settings import app_settings

View file

@ -18,7 +18,7 @@ from django.contrib.auth.models import User
from django.http import Http404, HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import (VIR_DOMAIN_UNDEFINE_KEEP_NVRAM, VIR_DOMAIN_UNDEFINE_NVRAM, libvirtError)
from logs.views import addlogmsg
from vrtManager import util
@ -973,7 +973,7 @@ def set_qos(request, pk):
messages.success(
request,
_("%(qos_dir)s QoS is set. Network XML is changed. \
Stop and start network to activate new config.") % {'qos_dir': qos_dir.capitalize()})
Stop and start network to activate new config." ) % {'qos_dir': qos_dir.capitalize()})
return redirect(request.META.get('HTTP_REFERER') + '#network')
@ -991,7 +991,7 @@ def unset_qos(request, pk):
messages.success(
request,
_("%(qos_dir)s QoS is deleted. Network XML is changed. \
Stop and start network to activate new config.") % {'qos_dir': qos_dir.capitalize()})
Stop and start network to activate new config." ) % {'qos_dir': qos_dir.capitalize()})
return redirect(request.META.get('HTTP_REFERER') + '#network')

View file

@ -1,6 +1,6 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class AddInterface(forms.Form):

View file

@ -1,5 +1,5 @@
from django.db.models import Model, CharField, DateTimeField
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class Logs(Model):

View file

@ -1,6 +1,6 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class AddNetPool(forms.Form):

View file

@ -2,7 +2,7 @@ from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import libvirtError
from admin.decorators import superuser_only

View file

@ -1,7 +1,7 @@
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import libvirtError
from admin.decorators import superuser_only

View file

@ -1,6 +1,6 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class AddStgPool(forms.Form):

View file

@ -4,7 +4,7 @@ from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import libvirtError
from admin.decorators import superuser_only

View file

@ -1,6 +1,6 @@
from django.contrib import messages
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from libvirt import libvirtError