Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

No preview for FileBrowseField in admin if there is a custom site #92

janLo opened this Issue May 21, 2012 · 0 comments


None yet
2 participants

janLo commented May 21, 2012

I use a differnt filebrowser site for my gallery than for the rest of my django stuff. For this site there where no preview icons within the admin. I found out, that in https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/fields.py#L53 there is a assignment site = self.site But in the template tag used in the custom field template there is a lookup for filebrowser_site on https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/templatetags/fb_versions.py#L108.

Because there is no filebrowser_site in the context the default site is used. The image thumbnail path does not exist in this sites storage, so the template tag thumbnail_version evaluetes to false at https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/templates/filebrowser/custom_field.html#L5

Change the assignment site = self.site to filebrowser_site = self.site (or add it because I don't know if changing have any side effects) fixes this.

@ghost ghost assigned vam Jun 20, 2012

@vam vam closed this in a1b4162 Jun 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment