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 *
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:
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