Is filebrowser-safe fully functional with django-storages and S3?

1,249 views
Skip to first unread message

Matt Cooper

unread,
Jun 30, 2012, 6:21:27 AM6/30/12
to mezzani...@googlegroups.com
Hi Stephen

Just wanted to check this before I start debugging in depth, it all seems to work with static files and when I upload files using the media library they get put in the S3 bucket, but then when it tries to list them I get a server error (which I haven't managed to see yet). As long as it should work I will set it up so I can step through the Mezzanine code.

Thanks

Matt

Stephen McDonald

unread,
Jun 30, 2012, 6:31:04 AM6/30/12
to mezzani...@googlegroups.com
Yes it's meant to be.
--
Stephen McDonald
http://jupo.org

Matt Cooper

unread,
Jun 30, 2012, 9:44:45 AM6/30/12
to mezzani...@googlegroups.com
I didn't have python-dateutil installed in my virtualenv.

All works now and looks great.

M

Stephen McDonald

unread,
Jun 30, 2012, 9:58:21 AM6/30/12
to mezzani...@googlegroups.com
Glad you worked it out. 

What needs python-dateutil, is it one of the S3 libs, or filebrowser?

Matt Cooper

unread,
Jun 30, 2012, 10:17:00 AM6/30/12
to mezzani...@googlegroups.com
it's in storages (/backends/s3boto.py)

def modified_time(self, name):
        try:
            from dateutil import parser, tz
        except ImportError:
            raise NotImplementedError()
        ............

Stephen McDonald

unread,
Jun 30, 2012, 10:18:55 AM6/30/12
to mezzani...@googlegroups.com
Ok great - wasn't sure if we need to add it as a dependency.

Thanks for the info Matt.

phil morelli

unread,
Sep 3, 2012, 9:26:51 PM9/3/12
to mezzani...@googlegroups.com, st...@jupo.org
Hi, I'm trying to use mezzanine on S3 but I can't get it work when I try to upload files. I get this error message : 

ImproperlyConfigured at /admin/media-library/browse/

Error finding Upload-Folder. Maybe it does not exist?
Any help? thnx

Eli Spizzichino

unread,
Jan 20, 2013, 1:02:45 PM1/20/13
to mezzani...@googlegroups.com, jonatan...@gmail.com
Hello Jonatan and all,
I'm in the process of deploying mezzanine and I just find out to be in the same situation!
What option do we have? I see:
· pull out the version of filebrowser with those patch and try to make it work
· don't change default_storage and perform some magic trickery in save() to send to the bucket and change the url of the file point to the new url
· try out django-uploadify-s3 maybe someone can advice what steps to take to integrate it like django-filebrowser

· deploy in openshift or any other having file Persistant Storage support

anyone is invited to leave suggestions!



2013/1/9 Jonatan Lundin <jonatan...@gmail.com>
Has anyone found a solution? I'm having the same issue.

Some related reading:

https://github.com/sehmaschine/django-filebrowser/issues/40



--
~ Eli ~

Eli Spizzichino

unread,
Jan 22, 2013, 11:21:03 AM1/22/13
to Jonatan Lundin, mezzani...@googlegroups.com
I've solved the ImproperlyConfigured: Error finding Upload-Folder.
you have to collectstatic to upload to the bucket and check the directory (media/uploads) is declared public!

However now admin have no thumnails,
and when browsing media-library it raise NotImplementedError.

if fileobject.filetype == request.GET.get('filter_type', fileobject.filetype) and get_filterdate(request.GET.get('filter_date', ''), fileobject.date):
File "/home/es/.virtualenvs/intero/lib/python2.7/site-packages/filebrowser_safe/base.py", line 83, in _date
self._date_stored = time.mktime(default_storage.modified_time(self.path).timetuple())
File "/home/es/.virtualenvs/intero/lib/python2.7/site-packages/storages/backends/s3boto.py", line 321, in modified_time
raise NotImplementedError()

(I have python-dateutil installed as noted in an other thread)
I think it may be related to this not yet fixed?
If anyone have successfully deployed with s3 please advice
moreover in admin
now it's very slow, it's this just me?





2013/1/20 Jonatan Lundin <jonatan...@gmail.com>
I'm afraid haven't made any progress on this other than opening an issue on GitHub. Might be worth keeping an eye on though. 


Jonatan



--
~ Eli ~

killeranaya

unread,
Feb 14, 2013, 9:53:01 PM2/14/13
to mezzani...@googlegroups.com
this error i fixing installing python-dateutil library

pip install python-dateutil

Matt Cooper

unread,
Feb 15, 2013, 2:57:32 AM2/15/13
to mezzani...@googlegroups.com, st...@jupo.org
Hi all

In the end I decided that the chances of it working smoothly at the moment were slim. I moved to a solution where I sync a local dir on each server using s3fs http://code.google.com/p/s3fs/ so that filebrowser is unaware of the fact that these files are synced.

This has been working well so far. There is a slight issue the first time it syncs as Django/Mezzanine/filebrowser creates the /uploads/ dir so when it tries to sync with the S3 bucket it finds the  dir already there. So I need to work this out.

This solution works for me at the moment, I'm not serving images from S3 just using them as a backed up and common storage for multiple instances to use. There are very few files being added so once it has synced there is little traffic.

I'd be interested in other peoples experiences. Obviously I would like to have a solution where I don't need to set all this up but I feel it's quite a bit ask.

Matt


On Wednesday, 9 January 2013 11:05:08 UTC+1, Jonatan Lundin wrote:
Has anyone found a solution? I'm having the same issue.

Some related reading:

https://github.com/sehmaschine/django-filebrowser/issues/40


Jonatan

On Tuesday, September 4, 2012 3:26:51 AM UTC+2, phil morelli wrote:

Nathan Keller

unread,
May 3, 2013, 4:51:03 PM5/3/13
to mezzani...@googlegroups.com, st...@jupo.org
Hey Matt, 
I'm curious how are you getting on with this solution. I'm looking to solve the same problem and would appreciate any additional notes you might have before I dive in. 
Cheers, 
Nathan
Reply all
Reply to author
Forward
0 new messages