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:
parent
cfd739778c
commit
9a75ceb0e5
5 changed files with 14 additions and 12 deletions
|
|
@ -1,5 +1,4 @@
|
|||
from django.db.models import (CASCADE, BooleanField, CharField, DateField,
|
||||
ForeignKey, Model)
|
||||
from django.db.models import (CASCADE, BooleanField, CharField, DateField, ForeignKey, Model)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from computes.models import Compute
|
||||
|
|
@ -12,17 +11,16 @@ class Instance(Model):
|
|||
is_template = BooleanField(_('is template'), default=False)
|
||||
created = DateField(_('created'), auto_now_add=True)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class PermissionSet(Model):
|
||||
"""
|
||||
Dummy model for holding set of permissions we need to be automatically added by Django
|
||||
"""
|
||||
class Meta:
|
||||
default_permissions = ()
|
||||
permissions = (
|
||||
('clone_instances', _('Can clone instances')),
|
||||
)
|
||||
permissions = (('clone_instances', _('Can clone instances')), )
|
||||
|
||||
managed = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue