Remove document version file field storage monkey patch

This commit is contained in:
Roberto Rosario
2012-09-11 05:21:20 -04:00
parent 76b89dfb36
commit ae40acd4f7

View File

@@ -16,7 +16,4 @@ def init_validate_cache_path():
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
def init_set_storage_backend():
# Monkey patch the file field until this is resolved: AttributeError:
# The 'file' attribute can only be accessed from DocumentVersion instances.
#DocumentVersion.file.storage = STORAGE_BACKEND()
DocumentVersion.add_to_class('file', models.FileField(upload_to=get_filename_from_uuid, verbose_name=_(u'file'), storage=STORAGE_BACKEND()))
DocumentVersion._meta.get_field('file').storage=STORAGE_BACKEND()