-
Notifications
You must be signed in to change notification settings - Fork 2
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
Move part of catalog.newcontext.products
classes to QuerySet
#255
Comments
@artemiy312 , what do you think about this proposal? |
Yes, we can do it. It looks like the django-way approach. Also we can remove some As the result only |
@artemiy312 , we can organise this code in a right way. It'll take not more space, then it taken in contexts now. PaginatedProducts does this two things:
Despite this two operations uses the same class, they are separated semantically. So, we can split them: the first peace we just throw away. The second one goes to queryset. So, i'll propose some code |
i'll adapt SE to the new refarm's code in the same task |
This set of classes are not contexts. They don't have their own context data, but have only QuerySet logic.
Later we discussed this module using at site with the architect. And Artemiy said, that this classes are semantically separated from others in this module
fidals/shopelectro#689 (comment)
If we'll move it's logic to QuerySets, we'll make this semantic more clear.
The text was updated successfully, but these errors were encountered: