def __unicode__(self): return '%s | %s | %s' % ( unicode(self.content_object), unicode(getattr(self, 'user', False) or self.group), unicode(self.permission.codename))
def test_unicode(self): codename = get_user_permission_codename('change') obj_perm = UserObjectPermission.objects.assign_perm( codename, self.user, self.user) self.assertTrue(isinstance(unicode(obj_perm), unicode))
def test_unicode(self): obj_perm = GroupObjectPermission.objects.assign_perm( "change_group", self.group, self.group) self.assertTrue(isinstance(unicode(obj_perm), unicode))
def test_unicode(self): obj_perm = GroupObjectPermission.objects.assign_perm("change_group", self.group, self.group) self.assertTrue(isinstance(unicode(obj_perm), unicode))
def test_unicode(self): codename = get_user_permission_codename('change') obj_perm = UserObjectPermission.objects.assign_perm(codename, self.user, self.user) self.assertTrue(isinstance(unicode(obj_perm), unicode))
def __unicode__(self): return u'%s | %s | %s' % ( unicode(self.content_object), unicode(getattr(self, 'user', False) or self.group), unicode(self.permission.codename))
def __str__(self): return '%s | %s | %s' % ( unicode(self.content_object), unicode(getattr(self, 'user', False) or self.organization), unicode(self.permission.codename))
def __unicode__(self): return "%s | %s | %s" % ( unicode(self.content_object), unicode(getattr(self, "user", False) or self.group), unicode(self.permission.codename), )