def main():
    args = parser.parse_args()
    # Generate Heroku app name.
    app_name = args.app or args.project_name.replace("_", "-")
    # Create the project.
    try:
        os.makedirs(args.dest_dir)
    except __HOLE__:
        pass
    management.call_command("startproject",
        args.project_name,
        args.dest_dir,
        template = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "project_template")),
        extensions = ("py", "txt", "slugignore", "conf", "gitignore", "sh",),
        app_name = app_name,
        user = getpass.getuser(),
    )
    # Make management scripts executable.
    make_executable(os.path.join(args.dest_dir, "manage.py"))
    # Audit and configure the project for Heroku.
    audit_args = ["python", os.path.join(args.dest_dir, "manage.py"), "heroku_audit", "--fix"]
    if not args.interactive:
        audit_args.append("--noinput")
    audit_returncode = subprocess.call(audit_args)
    if audit_returncode != 0:
        sys.exit(audit_returncode)
    # Give some help to the user.
    print "Heroku project created."
dataset/ETHPy150Open etianen/django-herokuapp/herokuapp/bin/herokuapp_startproject.py/main