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

'QueuedStorage' object has no attribute 'generate_filename' #31

Closed
Clemouuche opened this issue Jun 5, 2017 · 7 comments
Closed

'QueuedStorage' object has no attribute 'generate_filename' #31

Clemouuche opened this issue Jun 5, 2017 · 7 comments

Comments

@Clemouuche
Copy link

Clemouuche commented Jun 5, 2017

from queued_storage.backends import QueuedS3BotoStorage
from queued_storage.fields import QueuedFileField


class Video(models.Model):
    video = QueuedFileField(storage=QueuedS3BotoStorage(delayed=True))
    thumbnail = models.FileField()
    date_taken = models.DateTimeField(auto_now_add=True)

I got this in the doc for the Storage class

generate_filename(filename)[source]¶
New in Django 1.10.
Validates the filename by calling get_valid_name() and returns a filename to be passed to the save() method.

@melfelr
Copy link

melfelr commented Jul 26, 2017

I'm confirming the same.

@ashwoods
Copy link
Member

Fixed in master

@Gilbishkosma
Copy link

Is it fixed? cause i am getting the same error @ashwoods

@firmprojects
Copy link

'QueuedStorage' object has no attribute 'generate_filename'. Any fix?

@Gilbishkosma
Copy link

@firmprojects the above error is due to this issue #37 , the package is not updated since 2015.

@firmprojects
Copy link

Is there

@firmprojects the above error is due to this issue #37 , the package is not updated since 2015.

Is there any possible fix anywhere?

@Gilbishkosma
Copy link

@firmprojects You can extend the QueuedStorage class and add the generate_filename method on your own.

Example:

    class CustomQueuedStorage(QueuedStorage):
             def generate_filename(self, filename):
                    return self.get_storage(filename).generate_filename(filename)

and then use CustomQueuedStorage in your code. You can copy more missing methods from here

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

5 participants