import os dirname = os.path.dirname(globals()["__file__"]) TEMPLATE_DIRS = ( os.path.join(dirname, 'application_directory/templates'), )