Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution_genres_and_actors #544

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nsdNite
Copy link

@nsdNite nsdNite commented Oct 22, 2023

No description provided.

Copy link

@Dimosphen1 Dimosphen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, several comments were left for consideration.


class Actor(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to implement the __str__ method in your future models.

"Will Smith",
"Jaden Smith",
"Scarlett Johansson",
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make a tuple of tuples of strings and use unpacking during the iteration to avoid calling the .split() method for string. E.g.:

 actors_tuple = (
        ("George", "Klooney"),
        ("Kianu", "Reaves"),
        ...

And on line 26:

for first_name, last_name in actors_tuple:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants