Exemplo n.º 1
0
 def __init__(self,
              verbose_name=None,
              name=None,
              auto=True,
              version=1,
              node=None,
              clock_seq=None,
              namespace=None,
              **kwargs):
     kwargs['max_length'] = 36
     self.auto = auto
     self.version = version
     if version == 1:
         self.node, self.clock_seq = node, clock_seq
     elif version == 3 or version == 5:
         self.namespace, self.name = namespace, name
     StringField.__init__(self, verbose_name, name, **kwargs)
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     if 'default' not in kwargs:
         kwargs['default'] = '{}'
     StringField.__init__(self, *args, **kwargs)