-
-
Notifications
You must be signed in to change notification settings - Fork 865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google Cloud Storage backend using the gcloud-python library #236
Commits on Apr 10, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 2f6f6e7 - Browse repository at this point
Copy the full SHA 2f6f6e7View commit details -
Rename to gcloud, and import google.cloud
The "gcloud" Python module is now called "google.cloud", so use the new name. This means the name of this module needs to change too, since it can no longer be "google".
Configuration menu - View commit details
-
Copy full SHA for 85c53b5 - Browse repository at this point
Copy the full SHA 85c53b5View commit details -
Add @deconstructible to GoogleCloudStorage
This decorator is required to allow Django 1.7 migrations to serialize instances of this class. Without the decorator, running "makemigrations" on code like the following will fail with a "Cannot Serialize" error. from storages.backends.gcloud import GoogleCloudStorage gcs = GoogleCloudStorage() class SomeModel(models.Models): some_field = models.FileField(storage=gcs)
Configuration menu - View commit details
-
Copy full SHA for b3ec8b5 - Browse repository at this point
Copy the full SHA b3ec8b5View commit details -
According to https://googlecloudplatform.github.io/google-cloud-python/stable/storage-blobs.html#google.cloud.storage.blob.Blob.upload_from_file it's not actually necessary to specify a MIME type.
Configuration menu - View commit details
-
Copy full SHA for 1ddc32b - Browse repository at this point
Copy the full SHA 1ddc32bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8105cba - Browse repository at this point
Copy the full SHA 8105cbaView commit details -
We want to use this in the Google Cloud Storage backend as well. This is a separate commit so we can verify the clean_name tests in s3boto still pass (before I move those as well).
Configuration menu - View commit details
-
Copy full SHA for 7cb67d5 - Browse repository at this point
Copy the full SHA 7cb67d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 159b003 - Browse repository at this point
Copy the full SHA 159b003View commit details -
Configuration menu - View commit details
-
Copy full SHA for 621391a - Browse repository at this point
Copy the full SHA 621391aView commit details -
This is used by s3boto to support the AWS_LOCATION setting, which isn't needed by Google Cloud Storage
Configuration menu - View commit details
-
Copy full SHA for 058972f - Browse repository at this point
Copy the full SHA 058972fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cbe2530 - Browse repository at this point
Copy the full SHA cbe2530View commit details -
Configuration menu - View commit details
-
Copy full SHA for 189233a - Browse repository at this point
Copy the full SHA 189233aView commit details -
Add and use _normalize_name() like in s3boto
We need this even though we don't have "location" support since it undoes some of the weirdness (e.g. adding './' at the beginning of some paths) done by clean_name(). It would be possible to do this more simply but doing it this way makes things consistent with s3boto.
Configuration menu - View commit details
-
Copy full SHA for 3829f9a - Browse repository at this point
Copy the full SHA 3829f9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e16800e - Browse repository at this point
Copy the full SHA e16800eView commit details -
Only create a Blob in write mode
This is needed so we can detect attempts to open nonexistent files in read mode.
Configuration menu - View commit details
-
Copy full SHA for 0d61513 - Browse repository at this point
Copy the full SHA 0d61513View commit details -
Configuration menu - View commit details
-
Copy full SHA for dfe90b5 - Browse repository at this point
Copy the full SHA dfe90b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ad54cb - Browse repository at this point
Copy the full SHA 9ad54cbView commit details -
This fixes test failures caused by compat.py being removed as a result of dropping Django 1.7 support.
Configuration menu - View commit details
-
Copy full SHA for b37a9cb - Browse repository at this point
Copy the full SHA b37a9cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74f3841 - Browse repository at this point
Copy the full SHA 74f3841View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8fc9fb - Browse repository at this point
Copy the full SHA e8fc9fbView commit details
Commits on Apr 11, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 737ac57 - Browse repository at this point
Copy the full SHA 737ac57View commit details -
Fix modified_time; add get_modified_time
`modified_time` always returns a naive datetime. `get_modified_time`'s return depends on the USE_TZ setting.
Configuration menu - View commit details
-
Copy full SHA for 44f39cd - Browse repository at this point
Copy the full SHA 44f39cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb9307f - Browse repository at this point
Copy the full SHA bb9307fView commit details
Commits on Apr 12, 2017
-
Address further review comments
* Remove unused argument * Return filename when file does not exist
Configuration menu - View commit details
-
Copy full SHA for acbe31d - Browse repository at this point
Copy the full SHA acbe31dView commit details -
This required handling the num_bytes argument explicitly, so that's now tested.
Configuration menu - View commit details
-
Copy full SHA for 02e5829 - Browse repository at this point
Copy the full SHA 02e5829View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d2e206 - Browse repository at this point
Copy the full SHA 1d2e206View commit details
Commits on Apr 16, 2017
-
Configuration menu - View commit details
-
Copy full SHA for bbb203e - Browse repository at this point
Copy the full SHA bbb203eView commit details
Commits on Apr 18, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 598753b - Browse repository at this point
Copy the full SHA 598753bView commit details
Commits on Apr 19, 2017
-
* Simplify `num_bytes=None` handling * Make the `gs` warning a `DeprecationWarning`
Configuration menu - View commit details
-
Copy full SHA for 7ee116b - Browse repository at this point
Copy the full SHA 7ee116bView commit details