Exemplo n.º 1
0
 def __init__(self, name, content_type, size, charset):
     from mediadart.storage import new_id
     from django.conf import settings
     res_id = new_id()
     fpath = os.path.join(settings.MEDIADART_STORAGE, res_id)
     file = open(fpath, 'wb')
     super(StorageUploadedFile, self).__init__(file, name, content_type, size, charset)
Exemplo n.º 2
0
 def __init__(self, component=None, action_id=None, params=None, state="pending", last_active=0):
     self.task = None
     self.component = component
     self.action_id = action_id or new_id()
     self.params = params or [["__dummy__", []]]
     self.state = state
     self.last_active = last_active
Exemplo n.º 3
0
 def __init__(self, name, content_type, size, charset):
     from mediadart.storage import new_id
     from django.conf import settings
     res_id = new_id()
     fpath = os.path.join(settings.MEDIADART_STORAGE, res_id)
     file = open(fpath, 'wb')
     super(StorageUploadedFile, self).__init__(file, name, content_type,
                                               size, charset)
Exemplo n.º 4
0
 def __init__(self,
              component=None,
              action_id=None,
              params=None,
              state='pending',
              last_active=0):
     self.task = None
     self.component = component
     self.action_id = action_id or new_id()
     self.params = params or [['__dummy__', []]]
     self.state = state
     self.last_active = last_active