X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/49e1a0fdfaa15ac3cccb84fd993d68a72cc2a0b9..ad64a2d9487bb320ea88efc58c8bd9cc42d9c71e:/apps/filebrowser/views.py?ds=sidebyside diff --git a/apps/filebrowser/views.py b/apps/filebrowser/views.py index b507a75f..30869a4d 100644 --- a/apps/filebrowser/views.py +++ b/apps/filebrowser/views.py @@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse from django.core.exceptions import ImproperlyConfigured from django.dispatch import Signal -from django.utils.encoding import smart_unicode +from django.utils.encoding import smart_unicode, smart_str # filebrowser imports from filebrowser.fb_settings import * @@ -63,9 +63,9 @@ def browse(request): dir_list = os.listdir(abs_path) files = [] - print "LISTING FILES: ", dir_list + # print "LISTING FILES: ", dir_list for file in dir_list: - print repr(file) + # print repr(file) # EXCLUDE FILES MATCHING VERSIONS_PREFIX OR ANY OF THE EXCLUDE PATTERNS filtered = file.startswith('.') for re_prefix in filter_re: @@ -76,7 +76,7 @@ def browse(request): results_var['results_total'] += 1 # CREATE FILEOBJECT - fileobject = FileObject(os.path.join(DIRECTORY, path, file)) + fileobject = FileObject(os.path.join(smart_str(DIRECTORY), smart_str(path), smart_str(file))) # FILTER / SEARCH append = False