-
Notifications
You must be signed in to change notification settings - Fork 5
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
rf#197 Rm prepare_data from context #627
Conversation
shopelectro/views/catalog.py
Outdated
'product_images': context_.get_context_data()['product_images'], | ||
'product_brands': context_.get_context_data()['product_brands'], |
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.
'product_brands': context_.get_context_data()['product_brands'], | |
products_ctx = context_.get_context_data() | |
... | |
'product_images': products_ctx['product_images'], | |
'product_brands': products_ctx['product_brands'], |
class ProductImages(AbstractProductsListContext): | ||
|
||
@property | ||
def images(self) -> typing.Dict[int, Image]: |
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.
it is better to be a method, because it perform heavily computations
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.
@artemiy312 , we already have tags
, products
, product_pages
in the same property-style.
Let's leave as is too keep it's style. And fidals/refarm-site#194 with it's subtasks will solve this problem too
b601db4
to
bff0caf
Compare
... and customize images context
Depends on fidals/refarm-site#206
fidals/refarm-site#197
fidals/refarm-site#198