Skip to content
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

Django < 1.8 compatibility #10

Closed
jacobwegner opened this issue Dec 20, 2016 · 0 comments
Closed

Django < 1.8 compatibility #10

jacobwegner opened this issue Dec 20, 2016 · 0 comments

Comments

@jacobwegner
Copy link
Contributor

While the project has always required Django>=1.8, most of the backend has been compatible with earlier versions of Django.

Changes introduced in 148e910 (released in 0.3.0) added the max_length kwarg, which does not exist in earlier versions of Django.

To continue using the backend on earlier versions of Django, override the get_available_name method to remove the max_length kwarg:

def get_available_name(self, name):
    if self.allow_overwrite:
        return name
    return super(GoogleCloudStorage, self).get_available_name(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant