def __init__(self, *args, **kwargs):
     kwargs.setdefault("verbose_name",
                       _("What type of identity number is this?"))
     kwargs.setdefault("editable", True)
     kwargs.setdefault("max_length", 15)
     kwargs.setdefault("choices", IDENTITY_TYPE)
     CharField.__init__(self, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 7)
     kwargs.setdefault(
         'help_text',
         _('The format is 999/999, but either of the two numbers can be two or three digits'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 3
0
 def __init__(self,
              verbose_name=None,
              name=None,
              auto=True,
              version=1,
              node=None,
              clock_seq=None,
              namespace=None,
              **kwargs):
     if not HAS_UUID:
         raise ImproperlyConfigured(
             "'uuid' module is required for UUIDField. (Do you have Python 2.5 or higher installed ?)"
         )
     kwargs.setdefault('max_length', 36)
     if auto:
         self.empty_strings_allowed = False
         kwargs['blank'] = True
         kwargs.setdefault('editable', False)
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 4
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', False)
     kwargs.setdefault('blank', True)
     kwargs.setdefault('max_length', 50)
     kwargs.setdefault('verbose_name', 'Hostname')
     kwargs.setdefault('default', socket.gethostname())
     CharField.__init__(self, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('verbose_name', _('Initials'))
     kwargs.setdefault('max_length', 3)
     kwargs.setdefault(
         'help_text', _('Type 2-3 letters, all in uppercase and no spaces'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 6
0
    def __init__(self, based_fields=None, zoom=None, suffix='', 
                 max_length=63, *args, **kwargs):

        super(PlainLocationField, self).__init__(based_fields=based_fields,
                                                 zoom=zoom, suffix=suffix, *args, **kwargs)

        CharField.__init__(self, max_length=max_length, *args, **kwargs)
    def __init__(self, based_fields=None, zoom=None, suffix='', 
                 max_length=63, *args, **kwargs):

        super(PlainLocationField, self).__init__(based_fields=based_fields,
                                                 zoom=zoom, suffix=suffix, *args, **kwargs)

        CharField.__init__(self, max_length=max_length, *args, **kwargs)
Ejemplo n.º 8
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', False)
     kwargs.setdefault('blank', True)
     kwargs.setdefault('null', True)
     kwargs.setdefault('max_length', 150)
     kwargs.setdefault('verbose_name', 'Revision')
     CharField.__init__(self, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', False)
     kwargs.setdefault('blank', True)
     kwargs.setdefault('max_length', 50)
     kwargs.setdefault('verbose_name', 'Hostname')
     kwargs.setdefault('default', socket.gethostname())
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 10
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('verbose_name', _('What type of identity number is this?'))
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 15)
     kwargs.setdefault('choices', IDENTITY_TYPE)
     # kwargs.setdefault('help_text', _('Format is 9999[12]9999'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 11
0
 def __init__(self, *args, **kwargs):
     kwargs['max_length'] = kwargs.get('max_length', 32 )
     try:
         self.auto = kwargs['auto']
         del kwargs['auto']
     except KeyError:
         self.auto = True
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 12
0
    def __init__(self, max_length=63, *args, **kwargs):
        super(PlainLocationField, self).__init__(*args, **kwargs)

        kwargs.pop('based_fields', None)
        kwargs.pop('zoom', None)
        kwargs.pop('suffix', None)

        CharField.__init__(self, max_length=max_length, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault(
         'verbose_name', _('What type of identity number is this?'))
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 15)
     kwargs.setdefault('choices', IDENTITY_TYPE)
     # kwargs.setdefault('help_text', _('Format is 9999[12]9999'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 14
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 25)
     kwargs.setdefault('choices', DATE_ESTIMATED)
     kwargs.setdefault(
         'help_text',
         _('If the exact date is not known, please indicate which part of the date is estimated.'
           ))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 15
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
		if auto:
			kwargs['blank'] = True
			kwargs.setdefault('editable', False)
		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
		CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 16
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 ## This line was added to fix a ('no attribute found') error occuring at pre_save method.
     if auto:
         kwargs['blank'] = True
         kwargs.setdefault('editable', False)
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 17
0
 def __init__(self, verbose_name=None, name=None, auto=True, version=UUID_BASE_VERSION, node=None, clock_seq=None, namespace=None, **kwargs):
     kwargs['max_length'] = 36
     if auto:
         kwargs['blank'] = True
         kwargs.setdefault('editable', False)
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 18
0
 def __init__(self, verbose_name=None, name=None, auto=True, version=4, node=None, clock_seq=None, namespace=None, **kwargs):
     if not HAS_UUID:
         raise ImproperlyConfigured("'uuid' module is required for UUIDField. (Do you have Python 2.5 or higher installed ?)")
     kwargs.setdefault('max_length', 36)
     if auto:
         self.empty_strings_allowed = False
         kwargs['blank'] = True
         kwargs.setdefault('editable', False)
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 19
0
 def __init__(self,
              verbose_name=None,
              name=None,
              auto=True,
              version=1,
              node=None,
              clock_seq=None,
              namespace=None,
              **kwargs):
     kwargs.setdefault('max_length', 36)
     if auto:
         self.empty_strings_allowed = False
         kwargs['blank'] = True
         kwargs.setdefault('editable', False)
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 20
0
 def __init__(
     self,
     verbose_name=None,
     name=None,
     auto_if_unset=True,
     version=4,
     node=None,
     clock_seq=None,
     namespace=None,
     **kwargs
 ):
     kwargs["max_length"] = 512
     if auto_if_unset:
         kwargs["blank"] = True
         kwargs.setdefault("editable", False)
     self.auto_if_unset = auto_if_unset
     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
     CharField.__init__(self, verbose_name, name, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('blank', True)
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 22
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('blank', True)
     kwargs.setdefault('max_length', 35)
     kwargs.setdefault('verbose_name', _('...if "Other", specify'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 23
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', False)
     kwargs.setdefault('blank', False)
     kwargs.setdefault('max_length', 25)
     kwargs.setdefault('verbose_name', 'Salt')
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 24
0
 def __init__(self, verbose_name=None, name=None, **kwargs):
     kwargs['max_length'] = kwargs.get('max_length', 200)
     CharField.__init__(self, verbose_name, name, **kwargs)
     self.validators.append(validate_epic)
Ejemplo n.º 25
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault("blank", True)
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 26
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 25)        
     kwargs.setdefault('choices', DATE_ESTIMATED)
     kwargs.setdefault('help_text', _('If the exact date is not known, please indicate which part of the date is estimated.'))
     CharField.__init__(self, *args, **kwargs)
Ejemplo n.º 27
0
 def __init__(self, *args, **kwargs):
     kwargs.setdefault("editable", True)
     kwargs.setdefault("verbose_name", _("Initials"))
     kwargs.setdefault("max_length", 3)
     kwargs.setdefault("help_text", _("Type 2-3 letters, all in uppercase and no spaces"))
     CharField.__init__(self, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('editable', True)
     kwargs.setdefault('unique', True)
     kwargs.setdefault('max_length', 9)
     kwargs.setdefault('help_text', _('Format is 9999[12]9999'))
     CharField.__init__(self, *args, **kwargs)
 def __init__(self, *args, **kwargs):
     kwargs.setdefault('verbose_name', _('Mobile'))
     kwargs.setdefault('editable', True)
     kwargs.setdefault('max_length', 8)
     kwargs.setdefault('help_text', _('The format is 99999999'))
     CharField.__init__(self, *args, **kwargs)