from testapp.models import Author, Book


def get_all_info():
    my_dict = {}
    for name in Author.objects.all():
        local_list = [book.name for book in Book.objects.filter(author=name)]
        my_dict[name.first_name] = local_list
    return my_dict

7f4aaa54c6573fcb6b849a8148840de9528ff851
<mask token>

<mask token>


def get_all_info():
    my_dict = {}
    for name in Author.objects.all():
        local_list = [book.name for book in Book.objects.filter(author=name)]
        my_dict[name.first_name] = local_list
    return my_dict

from testapp.models import Author, Book


def get_all_info():
    my_dict = {}
    for name in Author.objects.all():
        local_list = [book.name for book in Book.objects.filter(author=name)]
        my_dict[name.first_name] = local_list
    return my_dict
