Example #1
0
 def multi_key(cls, keyname, *args):
     return MultiKeyReference.default_key(
         cls._prefix, keyname, '.'.join(escape_key(str(a)) for a in args))
Example #2
0
 def default_key(cls, *args):
     if not cls._indices:
         return cls._prefix
     else:
         return cls._prefix + '.' + '.'.join(
             escape_key(str(a)) for a in args)
Example #3
0
 def unique_key(cls, keyname, *args):
     return UniqueKeyReference.default_key(
         cls._prefix, keyname, '.'.join(escape_key(str(a)) for a in args))
Example #4
0
 def getkey(self):
     if not self._indices:
         return self._prefix
     else:
         return self._prefix + '.' + '.'.join(
             escape_key(str(getattr(self, ind))) for ind in self._indices)
Example #5
0
 def multi_key(cls, keyname, *args):
     return MultiKeyReference.default_key(cls._prefix, keyname, '.'.join(escape_key(str(a)) for a in args))
Example #6
0
 def unique_key(cls, keyname, *args):
     return UniqueKeyReference.default_key(cls._prefix, keyname, '.'.join(escape_key(str(a)) for a in args))
Example #7
0
 def default_key(cls, *args):
     if not cls._indices:
         return cls._prefix
     else:
         return cls._prefix + '.' + '.'.join(escape_key(str(a)) for a in args)
Example #8
0
 def getkey(self):
     if not self._indices:
         return self._prefix
     else:
         return self._prefix + '.' + '.'.join(escape_key(str(getattr(self, ind))) for ind in self._indices)