1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Replaced __unicode__ with __str__ for models

This commit is contained in:
Real-Gecko 2020-06-15 12:57:17 +06:00
parent cfd739778c
commit 9a75ceb0e5
5 changed files with 14 additions and 12 deletions

View file

@ -1,3 +1,4 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.core.validators import MinValueValidator
from django.db import models
@ -13,7 +14,7 @@ class UserInstance(models.Model):
is_delete = models.BooleanField(default=False)
is_vnc = models.BooleanField(default=False)
def __unicode__(self):
def __str__(self):
return self.instance.name
@ -22,7 +23,7 @@ class UserSSHKey(models.Model):
keyname = models.CharField(_('key name'), max_length=25)
keypublic = models.CharField(_('public key'), max_length=500)
def __unicode__(self):
def __str__(self):
return self.keyname
@ -76,7 +77,7 @@ class UserAttributes(models.Model):
UserAttributes.create_missing_userattributes(user)
UserAttributes.add_default_instances(user)
def __unicode__(self):
def __str__(self):
return self.user.username