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

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

Solution #855

wants to merge 9 commits into from

Conversation

DSahalatyi
Copy link

No description provided.

db/models.py Outdated
from django.db import models

import settings
Copy link

Choose a reason for hiding this comment

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

it's better to use
from django.conf import settings because there may be a few settings or a folder named "settings"

@@ -6,6 +7,7 @@
def get_movies(
genres_ids: list[int] = None,
actors_ids: list[int] = None,
title: str = None,
Copy link

Choose a reason for hiding this comment

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

str or None. fix annotation everywhere

Comment on lines 50 to 51
{"row": ticket.row, "seat": ticket.seat}
for ticket in movie_session.tickets.all()
Copy link

Choose a reason for hiding this comment

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

you can use .values() method instead of creating dicts manually

services/user.py Outdated
first_name: str = "",
last_name: str = "",
) -> User:
return get_user_model().objects.create_user(

Choose a reason for hiding this comment

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

You don’t need to return anything in create/update/delete methods, check everywhere

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.

3 participants