mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-30 00:49:37 +00:00
Replaced __unicode__ with __str__ for models
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user