def __init__(self, verbose_name=None, name=None, verify_exists=True, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, verbose_name, name, **kwargs) validator = validators.ExtendedURLValidator( verify_exists=verify_exists) self.validators.append(validator)
def __init__(self, verbose_name=None, name=None, verify_exists=True, allow_schemes=("http", "https"), allow_all_schemes=False, allow_netloc=True, allow_query=True, allow_fragment=True, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) OriginModelCharField.__init__(self, verbose_name, name, **kwargs) self.allow_schemes = allow_schemes or () self.allow_all_schemes = allow_all_schemes self.allow_netloc = allow_netloc self.allow_query = allow_query self.allow_fragment = allow_fragment self.validators.append( URLValidator2(allow_schemes=allow_schemes, allow_all_schemes=allow_all_schemes, allow_netloc=allow_netloc, allow_query=allow_query, allow_fragment=allow_fragment))
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)
def __init__(self, verbose_name=None, name=None, auto=True, **kwargs): self.auto = auto # Set this as a fixed value, we store UUIDs in text. kwargs['max_length'] = 36 if auto: # Do not let the user edit UUIDs if they are auto-assigned. kwargs['editable'] = False kwargs['blank'] = True CharField.__init__(self, verbose_name, name, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=None, **kwargs): kwargs['max_length'] = kwargs.get('max_length', DEFAULT_MAX_LENGTH) CharField.__init__(self, verbose_name, name, **kwargs) validator = VATINValidator(None) self.validators.append(validator)
def __init__(self, verbose_name=None, name=None, auto=True, **kwargs): self.auto = auto # Set this as a fixed value, we store UUIDs in text. kwargs['max_length'] = 36 if auto: # Do not let the user edit UUIDs if they are auto-assigned. kwargs['editable'] = False kwargs['blank'] = True CharField.__init__(self, verbose_name, name, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=True, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, verbose_name, name, **kwargs) validator = validators.ExtendedURLValidator( verify_exists=verify_exists) self.validators.append(validator)
def __init__(self, default=False, formatter=formatter, *args, **kwargs): # Check that the default value is a valid filter if default: if default not in formatter.filter_list: raise ImproperlyConfigured("'%s' is not a registered markup filter. Registered filters are: %s." % (default, ', '.join(formatter.filter_list.iterkeys()))) kwargs.setdefault('default', default) kwargs.setdefault('max_length', 255) kwargs.setdefault('choices', formatter.choices()) kwargs.setdefault('verbose_name', ugettext_lazy('markup')) CharField.__init__(self, *args, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=None, **kwargs): kwargs["max_length"] = kwargs.get("max_length", 200) CharField.__init__(self, verbose_name, name, **kwargs) # 'verify_exists' was deprecated in Django 1.4. To ensure backwards # compatibility, it is still accepted here, but only passed # on to the parent class if it was specified. self.verify_exists = verify_exists if verify_exists is not None: validator = validators.ExtendedURLValidator(verify_exists=verify_exists) else: validator = validators.ExtendedURLValidator() self.validators.append(validator)
def __init__(self, default=False, formatter=formatter, *args, **kwargs): # Check that the default value is a valid filter if default: if default not in formatter.filter_list: raise ImproperlyConfigured("'%s' is not a registered markup filter. Registered filters are: %s." % (default, ', '.join(formatter.filter_list.iterkeys()))) kwargs.setdefault('default', default) kwargs.setdefault('max_length', 255) kwargs.setdefault('choices', formatter.choices()) kwargs.setdefault('verbose_name', ugettext_lazy('markup')) CharField.__init__(self, *args, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=None, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, verbose_name, name, **kwargs) # 'verify_exists' was deprecated in Django 1.4. To ensure backwards # compatibility, it is still accepted here, but only passed # on to the parent class if it was specified. self.verify_exists = verify_exists if verify_exists is not None: validator = validators.ExtendedURLValidator( verify_exists=verify_exists) else: validator = validators.ExtendedURLValidator() self.validators.append(validator)
def __init__(self, verbose_name=_('Tags'), max_length=4000, blank=True, null=True, help_text=_('A comma-separated list of tags.'), **kwargs): kwargs['max_length'] = max_length kwargs['blank'] = blank kwargs['null'] = null kwargs['verbose_name'] = verbose_name kwargs['help_text'] = help_text self.max_length = max_length self.blank = blank self.null = null self.verbose_name = verbose_name self.help_text = help_text CharField.__init__(self, **kwargs)
def __init__(self, verbose_name=_('Tags'), max_length=4000, blank=True, null=True, help_text=_('A comma-separated list of tags.'), **kwargs): kwargs['max_length'] = max_length kwargs['blank'] = blank kwargs['null'] = null kwargs['verbose_name'] = verbose_name kwargs['help_text'] = help_text self.max_length = max_length self.blank = blank self.null = null self.verbose_name = verbose_name self.help_text = help_text CharField.__init__(self, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=True, allow_schemes=("http", "https"), allow_all_schemes=False, allow_netloc=True, allow_query=True, allow_fragment=True, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) OriginModelCharField.__init__(self, verbose_name, name, **kwargs) self.allow_schemes = allow_schemes or () self.allow_all_schemes = allow_all_schemes self.allow_netloc = allow_netloc self.allow_query = allow_query self.allow_fragment = allow_fragment self.validators.append( URLValidator2( allow_schemes=allow_schemes, allow_all_schemes=allow_all_schemes, allow_netloc=allow_netloc, allow_query=allow_query, allow_fragment=allow_fragment ) )
def __init__(self, verbose_name=None, name=None, **kwargs): kwargs['max_length'] = 200 CharField.__init__(self, verbose_name, name, **kwargs)
def __init__(self, verbose_name=None, name=None, verify_exists=None, **kwargs): kwargs['max_length'] = kwargs.get('max_length', DEFAULT_MAX_LENGTH) CharField.__init__(self, verbose_name, name, **kwargs) validator = VATINValidator(None) self.validators.append(validator)
def __init__(self, verbose_name=None, name=None, **kwargs): kwargs['max_length'] = 250 #less than 2^8 CharField.__init__(self, verbose_name, name, **kwargs)
def email_field_init(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 254) CharField.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, *args, **kwargs) self.validators.append(validators.ExtendedURLValidator())
def __init__(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 255) CharField.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 32) kwargs['blank'] = True CharField.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): from country_utils.countries import COUNTRY_CHOICES kwargs['max_length'] = 2 kwargs['choices'] = COUNTRY_CHOICES kwargs['null'] = kwargs.get('null', False) CharField.__init__(self, *args, **kwargs)
def __init__(self, verbose_name=None, name=None, **kwargs): kwargs['max_length'] = 8 kwargs['help_text'] ="ISO Language Code - ISO Country Code" CharField.__init__(self, verbose_name, name, **kwargs)
def __init__(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 100) CharField.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, *args, **kwargs) self.validators.append(validators.ExtendedURLValidator())
def email_field_init(self, *args, **kwargs): kwargs['max_length'] = kwargs.get('max_length', 200) CharField.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): kwargs['maxlength'] = 70 CharField.__init__(self, *args, **kwargs)