def top_level_files(project):
    """
    Given a project, return only the top-level files -
    useful for generating table-of-contents, etc
    """
    return project.files.filter(parent__isnull=True)