django-icanhaz icon indicating copy to clipboard operation
django-icanhaz copied to clipboard

Ensure app template dirs are always absolute paths

Open carljm opened this issue 13 years ago • 1 comments

If an app is imported via a relative entry on sys.path, then os.path.dirname(mod.__file__) could return a relative path, which would result in a relative app template dir path. This causes problems with the startswith sanity check in FilesystemFinder.find. The fix is to add an abspath in _get_app_template_dirs to ensure that it always returns full absolute paths.

carljm avatar Dec 20 '11 19:12 carljm

(Thanks to @rmaceissoft for finding this and reporting it as part of pull #3).

carljm avatar Dec 20 '11 19:12 carljm