Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        """
        Allow specifying a different format for the key used to identify
        versionized content in the model-definition.

        """
        #TODO: check if the string has the correct format
        self.rcskey_format = kwargs.pop('rcskey_format', "%s/%s/%s/%s.txt")
        self.IS_VERSIONED = True # so we can figure out that this field is versionized
        TextField.__init__(self, *args, **kwargs)
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        """
        Allow specifying a different format for the key used to identify
        versionized content in the model-definition.

        """
        if kwargs.get("rcskey_format", False):
            self.rcskey_format = kwargs["rcskey_format"]
            del kwargs["rcskey_format"]
            # TODO: check if the string has the correct format
        else:
            self.rcskey_format = "%s/%s/%s/%s.txt"
        self.IS_VERSIONED = True  # so we can figure out that this field is versionized
        TextField.__init__(self, *args, **kwargs)
 def __init__(self, verbose_name=None, name=None, **kwargs):
     TextField.__init__(self, verbose_name, name, **kwargs)
     self.validators.append(validators.URLValidator())
Ejemplo n.º 4
0
 def __init__(self, verbose_name=None, name=None, verify_exists=True, **kwargs):
     kwargs.pop('max_length', None)
     self.verify_exists = verify_exists
     TextField.__init__(self, verbose_name, name, **kwargs)
Ejemplo n.º 5
0
 def __init__(*args, **kwargs):
     TextField.__init__(*args, **kwargs)