path = smart_unicode(path)
if result:
    if not isinstance(result, (list, tuple)):
        result = [result]
output = '\n  '.join(smart_unicode(os.path.realpath(path)) for path in result)
Django: How to get a static file's filepath in a development environment?