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

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

Conversation

olena4reunited
Copy link

No description provided.

…et(override clean and save methods for data validation), User; update already existing services & create services order and user
…et(override clean and save methods for data validation), User; update already existing services & create services order and user
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 you may want to have settings folder and python will import it instead of real settings

db/models.py Outdated
Comment on lines 9 to 12
name = models.CharField(
max_length=255,
unique=True
)
Copy link

Choose a reason for hiding this comment

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

no need to move it if it fits in one line in lest than 79 characters

Comment on lines 9 to 12
def get_movies(
genres_ids: list[int] = None,
actors_ids: list[int] = None,
genres_ids: Optional[list[int]] = None,
actors_ids: Optional[list[int]] = None,
title: Optional[str] = None,
Copy link

Choose a reason for hiding this comment

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

let's use | operator everywhere instead of Optional because it's an old approach

Copy link

Choose a reason for hiding this comment

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

Fix everywhere

@@ -13,7 +17,7 @@ def create_movie_session(
)


def get_movies_sessions(session_date: str = None) -> QuerySet:
def get_movies_sessions(session_date: Optional[str] = None) -> QuerySet:
Copy link

Choose a reason for hiding this comment

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

Specify what kind of objects this queyset contains

Copy link

@Oleksl888 Oleksl888 left a comment

Choose a reason for hiding this comment

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

Well done! 👏

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