askbot.deployment.path_utils

utilities in addition to os.path that * help to test existing paths on usability for the installation * create necessary directories * install deployment files

askbot.deployment.path_utils.can_create_path(directory)

returns True if user can write file into directory even if it does not exist yet and False otherwise

askbot.deployment.path_utils.create_path(directory)
askbot.deployment.path_utils.deploy_into(directory, new_project=None)

will copy necessary files into the directory

askbot.deployment.path_utils.dir_name_acceptable(directory)
askbot.deployment.path_utils.directory_is_writable(directory)

returns True if directory exists and is writable, False otherwise

askbot.deployment.path_utils.find_parent_dir_with_django(directory)

returns path to Django project anywhere above the directory if nothing is found returns None

askbot.deployment.path_utils.has_existing_django_project(directory)

returns True is any of the .py files in a given directory imports anything from django

askbot.deployment.path_utils.path_is_clean_for_django(directory)

returns False if any of the parent directories contains a Django project, otherwise True does not check the current directory

askbot.deployment.path_utils.split_at_break_point(directory)

splits directory path into two pieces first that exists and secon - that does not by determining a point at which path breaks

exception will be raised if directory in fact exists

This Page