Пример #1
0
 def __unicode__(self):
     return '%s | %s | %s' % (
         unicode(self.content_object),
         unicode(getattr(self, 'user', False)
                 or self.group), unicode(self.permission.codename))
Пример #2
0
 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))
Пример #3
0
 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))
Пример #6
0
 def __unicode__(self):
     return u'%s | %s | %s' % (
         unicode(self.content_object),
         unicode(getattr(self, 'user', False) or self.group),
         unicode(self.permission.codename))
Пример #7
0
 def __str__(self):
     return '%s | %s | %s' % (
         unicode(self.content_object),
         unicode(getattr(self, 'user', False) or self.organization),
         unicode(self.permission.codename))
Пример #8
0
 def __unicode__(self):
     return "%s | %s | %s" % (
         unicode(self.content_object),
         unicode(getattr(self, "user", False) or self.group),
         unicode(self.permission.codename),
     )