Created
June 1, 2011 14:42
-
-
Save sjl/1002427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: templatetags/fb_versions.py | |
=================================================================== | |
--- templatetags/fb_versions.py (revision 692) | |
+++ templatetags/fb_versions.py (working copy) | |
@@ -11,6 +11,7 @@ | |
# filebrowser imports | |
from filebrowser.settings import MEDIA_ROOT, MEDIA_URL, VERSIONS | |
+from filebrowser.fields import FileBrowseField | |
from filebrowser.functions import path_to_url, get_version_path, version_generator | |
from filebrowser.base import FileObject | |
@@ -39,6 +40,8 @@ | |
except VariableDoesNotExist: | |
return None | |
try: | |
+ if isinstance(source, FileBrowseField): | |
+ source = source.path | |
source = force_unicode(source) | |
version_path = get_version_path(source, version_prefix) | |
if not os.path.isfile(version_path): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment