Skip to content

Conversation

@Nikita5390
Copy link
Collaborator

No description provided.

@Nikita5390 Nikita5390 added the ready for review This label shows, that your task is ready and I can rewiev it. label Jul 11, 2022
@Nikita5390 Nikita5390 requested a review from Chudopal July 11, 2022 19:32
@Nikita5390 Nikita5390 changed the title [#H21].(Django TG hw) [#H21] Django TG hw Jul 12, 2022
Copy link
Owner

@Chudopal Chudopal left a comment

Choose a reason for hiding this comment

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

Не могу пока разрешить мержить это решение, меня немного напугал хардкод в urls

Comment on lines +84 to +85
'USER': 'admin',
'PASSWORD': 'admin',
Copy link
Owner

Choose a reason for hiding this comment

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

ну все теперь я знаю пароль и могу поломать все приложение)

Comment on lines +7 to +8
path('price_gt=20&price_lt=50/', view=get_filter_products1),
path('price_gte=20&price_lte=50/', view=get_filter_products2),
Copy link
Owner

Choose a reason for hiding this comment

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

ой не, это неправильно. Почитай лучше эту статью: https://metanit.com/python/django/3.4.php



def get_filter_products1(request):
all_product = Product.objects.filter(cost__gt=20, cost__lt=50)
Copy link
Owner

Choose a reason for hiding this comment

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

не стоит хардкодить значения, получать их надо прямо из запроса

@Chudopal Chudopal added done! If your PR is correct and you can merge it and removed ready for review This label shows, that your task is ready and I can rewiev it. labels Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done! If your PR is correct and you can merge it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants