Exemple #1
0
 def __init__(self, instance, field, name):
     File.__init__(self, None, name)
     self.instance = instance
     self.field = field
     self._committed = True
     self.storages = self.field.storages
     self.thumbnail_storages = self.field.thumbnail_storages
 def __init__(self, instance, field, name):
     File.__init__(self, None, name)
     self.instance = instance
     self.field = field
     self._committed = True
     self.storages = self.field.storages
     self.thumbnail_storages = self.field.thumbnail_storages
Exemple #3
0
    def __init__(self, content='', parent=None, name=None):
        #init InMemoryNode
        self.parent = parent

        #init File
        if six.PY3:
            stream_class = StringIO if isinstance(content, six.text_type) else BytesIO
        else:
            stream_class = six.BytesIO
            content = force_bytes(content)
        File.__init__(self, stream_class(content), name=name)
Exemple #4
0
 def __init__(self, connection, container_name, name, *args, **kwargs):
     self.connection = connection
     self.container_name = container_name
     self._pos = 0
     File.__init__(
         self,
         file=None,
         name=name,
         *args,
         **kwargs
     )
    def __init__(self, content='', parent=None, name=None):
        #init InMemoryNode
        self.parent = parent
        self.created_at = timezone.now()
        self.last_modified = timezone.now()
        self.last_accessed = timezone.now()

        #init File
        if six.PY3:
            stream_class = StringIO if isinstance(content, six.text_type) else BytesIO
        else:
            stream_class = six.BytesIO
            content = force_bytes(content)
        File.__init__(self, stream_class(content), name=name)
    def __init__(self, content='', parent=None, name=None):
        #init InMemoryNode
        self.parent = parent
        self.created_at = timezone.now()
        self.last_modified = timezone.now()
        self.last_accessed = timezone.now()

        #init File
        if six.PY3:
            stream_class = StringIO if isinstance(content, six.text_type) else BytesIO
        else:
            stream_class = six.BytesIO
            content = force_bytes(content)
        File.__init__(self, stream_class(content), name=name)
 def __init__(self, instance, name):
     File.__init__(self, None, name)
     self.instance = instance
     self.storage = STATIC_STORAGE
     self.field = self
 def __init__(self, instance, name):
     File.__init__(self, None, name)
     self.instance = instance
     self.storage = STATIC_STORAGE
     self.field = self
 def __init__(self, name):
     File.__init__(self, None, name)
     self.field = self
Exemple #10
0
 def __init__(self, name):
     File.__init__(self, None, name)
     self.field = self
 def __init__(self, name):
     File.__init__(self, None, name)
     self.storage = CONFIGSTORE_FILE_STORAGE
     self._committed = True
 def __init__(self, name):
     File.__init__(self, None, name)
     self.storage = CONFIGSTORE_FILE_STORAGE
     self._committed = True
 def __init__(self, name):
     File.__init__(self, None, name)
     self.field = self
     self.is_icon = True
Exemple #14
0
 def __init__(self, name):
     File.__init__(self, None, name)
     self.field = SimpleNamespace(storage=get_storage())
     self.instance = None