Giter Club home page Giter Club logo

django-cloud-browser's People

Contributors

bluecamel avatar c-w avatar corcoran avatar michaelperel avatar noodley avatar ryan-roemer avatar sysradium avatar wenjunxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-cloud-browser's Issues

Google cloud storage configuration

When I set up my cloud credentials info for googlestorage, I get message to confirm my identity but I get this as an error:

image

I am doing it qrong ? Do I need to get through this part ?

Refactor Rackspace to OpenStack

Change Rackspace's python-cloudfiles (which doesn't work on Python3 and is deprecated) to OpenStack's python-swiftclient.

Pass additional kwargs to libcloud

Hi! I'm using the apache-libcloud datastore and looking to access an S3 bucket that isn't in the AWS's us-east-1 region.

After setting up django-cloud-browser, I can see the bucket listed! (So easy to set up--thank you.) When I click the link to look in the bucket, Django throws an error:

<LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'This bucket is located in a different region. Please use the correct driver. Bucket region "us-east-2", used region "us-east-1".'>

That's obviously an apache-libcloud error--it has a default region to fallback on. In looking up that error I found this:

apache/libcloud#1379 (comment)

...and it looks like the fix is to explicitly pass a region kwarg to get_driver constructor. Make sense.

I read through the django-cloud-browser documentation and source but it doesn't look like there is way to pass additional kwargs through to here:

via here:

conn_fn = lambda: ApacheLibcloudConnection(

  1. My first question is--am I missing an obvious way to set the region keyword in django-cloud-browser so it gets picked up in apached-libcloud?

  2. Second question is, assuming I'm not missing something...would it make sense to have a settings.py variable that could contain arbitrary kwargs that can be passed through to libcloud? Something like:

CLOUD_BROWSER_APACHE_LIBCLOUD_KWARGS = {
  'region': 'us-east-2'
}

Or, since region seems to be a kwarg found for most (all?) classes in libcloud.storage.drivers, would it make sense to follow the pattern in 77e8f03 and add a CLOUD_BROWSER_APACHE_LIBCLOUD_REGION variable?

I'd be happy to work up a PR doing this if the approach make sense.

URL characters seem to break container content listing

Attempting to list blobs in a virtual folder that contains a special character seems to break for the libcloud backend.

Here we can see a first-level folder expansion working fine:

Screenshot showing first-level folder expansion working fine

When we click on any of the folders containing an @, the next level expansion shows no content although the folder in the underlying object storage does contain blobs:

Screenshot showing issue with container listing and URL characters

Add pycodestyle

We've removed old pep8. Should get a new pycodestyle.

Possible config:

[pycodestyle]
# * E402: module level import not at top of file
# * E501: line too long (82 > 79 characters) (enforced by pylint)
# * E731: do not assign a lambda expression, use a def
ignore = E402,E501,E731
statistics = True

boto to boto3

I saw that boto is used for both AWS and Google Cloud Storage. Shouldn't boto be upgraded to boto3? Not sure if boto3 supports google cloud storage though.

AWS Account name

Hi all,

Thanks for the plugin.

I'm trying to configure this with an AWS s3 bucket and I'm a little confused about the settings terminology.

What should go with 'CLOUD_BROWSER_AWS_ACCOUNT'? Does that refer to the account name/email? Or the AWS account ID?

S3 objects with white spaces are not supported

When clicking on a S3 object (file) that includes white spaces there is a 404 error.
Looks like the URLs need to be decoded and escaped characters need to be replaced in the document view code.

Odd NoneType object has no attribute makefile error

The user didn't see any errors, but cloud_browser called cloudfiles which called httplib which got upset. Ever see this before?

.
.
.

File "/usr/local/lib/python2.7/dist-packages/cloud_browser/cloud/rackspace.py", line 206, in _get_object_infos
   limit=limit, delimiter=SEP, prefix=path, marker=marker)

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/utils.py", line 45, in decorator
   return f(*args, **kwargs)

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/container.py", line 377, in list_objects_info
   prefix, limit, marker, path, delimiter, **parms)

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/utils.py", line 45, in decorator
   return f(*args, **kwargs)

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/container.py", line 427, in _list_objects_raw
   response = self.conn.make_request('GET', [self.name], parms=parms)

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/connection.py", line 189, in make_request
   response = retry_request()

 File "/usr/local/lib/python2.7/dist-packages/cloudfiles/connection.py", line 183, in retry_request
   return self.connection.getresponse()

 File "/usr/lib/python2.7/httplib.py", line 1028, in getresponse
   response = self.response_class(*args, **kwds)

 File "/usr/lib/python2.7/httplib.py", line 346, in __init__
   self.fp = sock.makefile('rb', 0)

AttributeError: 'NoneType' object has no attribute 'makefile'

Error when installing with pip

Python version 3.6.3
pip version 10.0.1

I'm also in a python virtual env

  Using cached https://files.pythonhosted.org/packages/9f/b8/f3c67ddc85a35e65fae3cf8b0a43380e6259cac5c4698195b06ca4b46778/django-cloud-browser-0.4.0.tar.gz
Collecting distribute (from django-cloud-browser)
  Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.