app_config.get('user_template_path'))
# Set up storage systems
- self.public_store = storage.storage_system_from_paste_config(
+ self.public_store = storage.storage_system_from_config(
app_config, 'publicstore')
- self.queue_store = storage.storage_system_from_paste_config(
+ self.queue_store = storage.storage_system_from_config(
app_config, 'queuestore')
# set up routing
return cleaned_filepath
-def storage_system_from_paste_config(paste_config, storage_prefix):
+def storage_system_from_config(paste_config, storage_prefix):
"""
Utility for setting up a storage system from the paste app config.
An instantiated storage system.
Example:
- storage_system_from_paste_config(
+ storage_system_from_config(
{'publicstore_base_url': '/media/',
'publicstore_base_dir': '/var/whatever/media/'},
'publicstore')
local_storage = False
-def test_storage_system_from_paste_config():
- this_storage = storage.storage_system_from_paste_config(
+def test_storage_system_from_config():
+ this_storage = storage.storage_system_from_config(
{'somestorage_base_url': 'http://example.org/moodia/',
'somestorage_base_dir': '/tmp/',
'somestorage_garbage_arg': 'garbage_arg',
assert this_storage.base_dir == '/tmp/'
assert this_storage.__class__ is storage.BasicFileStorage
- this_storage = storage.storage_system_from_paste_config(
+ this_storage = storage.storage_system_from_config(
{'somestorage_foobie': 'eiboof',
'somestorage_blech': 'hcelb',
'somestorage_garbage_arg': 'garbage_arg',