FileBrowser Test Version

2 views
Skip to first unread message

patrickk

unread,
Jul 8, 2006, 5:34:23 AM7/8/06
to django...@googlegroups.com
today we´ve finished the test version of our django filebrowser.

some screenshots are here:
http://www.vonautomatisch.at/django/filebrowser/

you can download the filebrowser here:
http://www.vonautomatisch.at/django/filebrowser/FileBrowser.zip

installation shouldn´t take more than 5-10 minutes.
requirements: we are using PIL to create the thumbnails.

this version is for testing (although we´re already using it). I hope
that some of you will find the time to install the filebrowser.
feedback is more than welcome.

thanks,
patrick


Jorge Gajon

unread,
Jul 8, 2006, 12:21:58 PM7/8/06
to django...@googlegroups.com
Wow, thank you this is fantastic.

It's highly probable that I'll use this soon. When I do, I'll make
sure to give you feedback and contribute back with something of
course.

Thank you for releasing this, it will be very useful for a project we
will work on soon.

Cheers,
Jorge

favo

unread,
Jul 9, 2006, 9:39:05 AM7/9/06
to Django users
It's very cool, open svn address is better:-)

Panos Laganakos

unread,
Jul 9, 2006, 3:23:45 PM7/9/06
to Django users
Great Job mate,

thanks for releasing.

patrickk

unread,
Jul 10, 2006, 8:30:17 AM7/10/06
to django...@googlegroups.com
yes, working on that one ...

Archatas

unread,
Jul 11, 2006, 6:39:36 AM7/11/06
to Django users
Very nice, but there are some gotchas/bugs:

1. to make it work on Python 2.3, you need to change
line 198 in views.py
file_list.sort(cmp, lambda x: x[int(o)])
to
file_list.sort(lambda x, y: cmp(x[int(o)], y[int(o)]))
(sort method takes only the comparisson function as a parameter in
Python 2.3)

2. The links in the admin breadcrubs are not relative as in the
original admin, therefore I need to change all templates if I have my
django project in some directory instead of in the root of the domain.

3. If I upload an image to the root of uploads, the thumbnail isn't
showed, because of additional slash in the path that is added next to
the dir_name which doesn't exist. I think, you should also check
whether dir_name is set at all, and only then add that slash at the
end.

4. It works in Firefox, but it seems a little bit strange and may not
work in other browsers, because all the uploaded images are being
accessed with additional slash at the end of the URL.

That were my notices. But on the whole, great work!

Aidas Bendoraitis [aka Archatas]

Phil Powell

unread,
Jul 11, 2006, 6:53:10 AM7/11/06
to django...@googlegroups.com
This is fantastic stuff! I'll be taking a look at testing it out and
possibly implementing for a current project (thousands of image files
to manage).

Any plans for a SVN address?

-Phil

va:patrick.kranzlmueller

unread,
Jul 11, 2006, 7:02:47 AM7/11/06
to django...@googlegroups.com
thanks.

I will take a look at the bugs mentioned by archatas - so there'll
probably be a new version for download later today.

SVN: I´ve never worked with SVN (well, besides using django), no idea
how to do the setup. It´d be very useful but I don´t have the time to
digg into that right now.

patrick

va:patrick.kranzlmueller

unread,
Jul 11, 2006, 11:11:58 AM7/11/06
to django...@googlegroups.com
a new version of the filebrowser is available for download.

CHANGES:
001: You may define an initial directory for each FileBrowseField by
adding a path to the help_text: Like "FileBrowser: /images/blog/" or
"FileBrowser: /documents/pdf/".
002: Sorting algorithm also works with Python 2.3 now (thanks Archatas)
003: Additional slashes are only used for folders now

I still need to look at the breadcrumbs.

thanks for your feedback,
patrick

Phil Powell

unread,
Jul 12, 2006, 8:01:59 AM7/12/06
to django...@googlegroups.com
Thanks for the update Patrick. I've got this part working, but having
trouble with makethumb on existing files on the server - not had time
to delve too deeply yet to see what the problem is though.

-Phil

patrickk

unread,
Jul 12, 2006, 8:29:12 AM7/12/06
to django...@googlegroups.com
makethumb works for me - although the makethumb-image is not
displayed correctly (I´ve already changed that).

change line 170 of filebrowser/views.py from
path_to_file = '/media/img/filebrowser_Thumb.gif'
to
path_to_file = '/media/img/filebrowser/filebrowser_Thumb.gif'

note: our hosting-provider has setup trac for us. so, hopefully we'll
have an SVN address soon.

patrick

Niels

unread,
Jul 12, 2006, 10:21:17 AM7/12/06
to Django users
Great stuff, a big thank you.

One proposition to add to views.py just below the variable declaration
block:

for (k,v) in EXTENSIONS.items():
for e in v[:]:
v.append(e.upper())

which makes extension lookup work for uppercase as well.

And one glitch that occurs on winXP/IE6:
An extra debug upload button appears. On firefox, <!--> xxx <-->
correctly comments out the xxx, in internet explorer, [upload] <-->
[upload] gets displayed.

Best, Niels

Phil Powell

unread,
Jul 12, 2006, 10:41:41 AM7/12/06
to django...@googlegroups.com
Still having trouble with those thumbnails Patrick:

Seems that whenever I click on the thumbnail link, or the "delete"
link, a blank filebrowser index page is returned to me. The URL seems
to be formed properly in the form:

/admin/filebrowser/makethumb/my_file.jpg

Seems to be rendering the response, but with no context returned. Any ideas?

-Phil

favo

unread,
Jul 12, 2006, 10:42:14 AM7/12/06
to Django users
could anyone can help va:patrick.kranzlmueller to setup a open svn
trunk even with a trac system?
It's very hard to communicte with feedback - upload - feedback...

patrickk

unread,
Jul 12, 2006, 10:47:07 AM7/12/06
to django...@googlegroups.com
as mentioned before, I´m currently getting help from my hosting-
provider.
trac is already set up on our server - of course, help is still
appreciated.

benj

unread,
Jul 22, 2006, 9:36:03 PM7/22/06
to Django users
Patrick,
Thanks for this great extension!
One snag I hit is that your code assumes we serve our admin media from
/media/, which I happen not to. I just ran ''' sed -i -e
"s:/media/:/admin-media/:g" *html ''' in the templates dir, but this
setting is already available in
django.conf.settings.ADMIN_MEDIA_PREFIX, so it would be great to see
that happen automatically.
Thanks again,
Benj

patrickk

unread,
Jul 23, 2006, 8:12:16 AM7/23/06
to django...@googlegroups.com
thanks, benj. I will update as soon as possible - still trying to
install the svn-repository ...
Reply all
Reply to author
Forward
0 new messages