Пример #1
0
 def __init__(self, *args, **kwargs):
     kwargs['blank'] = True
     if 'default' not in kwargs:
         kwargs['default'] = []
     if 'type' in kwargs:
         self._internaltype = kwargs.pop("type")
         
     Field.__init__(self, *args, **kwargs)
Пример #2
0
 def __init__(self, *args, **kwargs):
     if kwargs.get("auto_now", False):
         self.auto_now = True
         kwargs.pop("auto_now")
     if kwargs.get("auto_now_add", False):
         self.auto_now_add = True
         kwargs.pop("auto_now_add")
     Field.__init__(self, *args, **kwargs)
Пример #3
0
 def __init__(self, *args, **kwargs):
     assert kwargs.get('primary_key', False) is True,\
     "%ss must have primary_key=True." % self.__class__.__name__
     kwargs['blank'] = True
     self.length = kwargs.pop("length", 9)
     Field.__init__(self, *args, **kwargs)
Пример #4
0
    def __init__(self, *args, **kwargs):
        kwargs['blank'] = True

        Field.__init__(self, *args, **kwargs)
Пример #5
0
 def __init__(self, *args, **kwargs):
     Field.__init__(self, validators = [arrayvalidator], **kwargs)
Пример #6
0
 def __init__(self, verbose_name=None, name=None, separator=default_separator, **kwargs):
     self.separator = separator
     Field.__init__(self, verbose_name, name, **kwargs)
Пример #7
0
 def __init__(self, *args, **kwargs):
     Field.__init__(self, *args, **kwargs)
Пример #8
0
 def __init__(self, *args, **kwargs):
     kwargs['null'] = True
     kwargs['blank'] = True
     Field.__init__(self, *args, **kwargs)
     if self.default != NOT_PROVIDED:
         self.blank = False  # blank is false because it has default value
Пример #9
0
 def __init__(self, *args, **kwargs):
     assert kwargs.get('primary_key', False) is True,\
     "%ss must have primary_key=True." % self.__class__.__name__
     kwargs['blank'] = True
     self.length = kwargs.pop("length",9)
     Field.__init__(self, *args, **kwargs)
Пример #10
0
    def __init__(self, *args, **kwargs):
        kwargs['blank'] = True

        Field.__init__(self, *args, **kwargs)