input: Write a python function to retrieve and print book titles and authors from a Django model.
  assert retrieve_books() == "Title1 - Author1\nTitle2 - Author2\n"
output: def retrieve_books():
      from myapp.models import Book  # Assuming the model is defined in myapp.models
      books = Book.objects.all()
      result = "\n".join(f"{book.title} - {book.author}" for book in books)
      return result