summaryrefslogtreecommitdiff
path: root/examples/libcloud_project/test_storage.py
diff options
context:
space:
mode:
authorYuval Adam <yuval@segmanta.com>2014-03-20 17:49:16 +0200
committerYuval Adam <yuval@segmanta.com>2014-03-20 17:49:16 +0200
commit75f93a3f7854a7383febd047391e2bfd4caceee0 (patch)
treed5e634ef292c6b84acacc3982dbcaa0d300a346e /examples/libcloud_project/test_storage.py
Initial git fork of django-storagesHEADmaster
Diffstat (limited to 'examples/libcloud_project/test_storage.py')
-rw-r--r--examples/libcloud_project/test_storage.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/libcloud_project/test_storage.py b/examples/libcloud_project/test_storage.py
new file mode 100644
index 0000000..18d1b72
--- /dev/null
+++ b/examples/libcloud_project/test_storage.py
@@ -0,0 +1,14 @@
+import sys, os
+PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
+sys.path.append(PROJECT_PATH)
+
+from django.core.management import setup_environ
+import settings
+setup_environ(settings)
+
+from storages.backends.apache_libcloud import LibCloudStorage
+
+# test_google_storage is a key in settings LIBCLOUD_PROVIDERS dict
+store = LibCloudStorage('test_google_storage')
+# store is your django storage object that will use google storage
+# bucket specified in configuration \ No newline at end of file