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 #556

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Solution #556

wants to merge 3 commits into from

Conversation

Naz-iv
Copy link

@Naz-iv Naz-iv commented Oct 29, 2023

No description provided.

main.py Outdated
Comment on lines 23 to 27
genres = [Genre.objects.create(name=genre) for genre in genres]
actors = [Actor.objects.create(
first_name=name,
last_name=surname
) for name, surname in actors]

Choose a reason for hiding this comment

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

No need to create lists here

main.py Outdated
Comment on lines 46 to 56
Genre.objects.filter(
name="Action"
).delete()

Actor.objects.filter(
first_name="Scarlett"
).delete()

actors = Actor.objects.filter(
last_name="Smith"
).order_by("first_name")

Choose a reason for hiding this comment

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

You can skip brake in lines if it fits in one

Copy link

@fsocie7y fsocie7y left a comment

Choose a reason for hiding this comment

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

GJ 👍

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.

4 participants