-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/filters product list #80
Conversation
|
||
def __init__(self, *args, **kwargs): | ||
super(ProductFilter, self).__init__(*args, **kwargs) | ||
self.filters['name'].label = 'Nazwa produktu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if those are needed. labels already defined here:
field_labels={
'price': 'Cena rosnąco',
'-price': 'Cena malejąco',
'-name': 'Produkt A-Z',
'name': 'Produkt Z-A',
'created_at': 'Najnowsze',
'-created_at': 'Najstarsze',
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's okay either, but I need the eye of an experienced programmer @jacoor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha. I don't know :-)
You need to experiment with it and see if it works as intended or is needed.
That's what I would do.
I just added the newest, the oldest product order filters. Also availability filters have been added. Tests of |
@Pawelooo you need to update from dev. |
…Dshop into feature/filters-product-list
I updated branch from dev, so pull. |
|
||
|
||
|
||
# @pytest.mark.django_db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove those comments
@jacoor updated |
I created a search for products only on active ones. I don't know if it's not enough to search for not active products ?
At Orderingfilter, he returns Z-A products first and not the A-Z product first
A-Z product
Product with Z-A and next Product A-Z