These are chat archives for mirumee/saleor

15th
May 2018
NyanKiyoshi
@NyanKiyoshi
May 15 2018 05:37

Depends on what you want to edit... You can safely edit templates without generating much conflicts. But if you want to edit the core python code, it may generate quite a lot of conflicts, depending on your changes.

If you will edit the core, you will need to keep track of your changes and keep them clean (organized commits). Then you will need to whether maintain your changes by regularly merging Saleor's master into your version and keep track of the changes introduced by the pull requests.

If your changes are not that many, you can manually replay your commits on the latest Saleor each time there is a new release (if you feel the release if stable, otherwise it's better to skip it).

There is not much magic than that when it comes to the core

Filip Kucharczyk
@Pacu2
May 15 2018 09:49
NyanKiyoshi
@NyanKiyoshi
May 15 2018 12:13
image.png
@Pacu2 on our production version, we have a checkbox on attributes to set them as hidden to avoid those kind of messes as above. Do you think Saleor could use that?
Or should we review the mechanism of attributes to allow better setting of attributes?
Filip Kucharczyk
@Pacu2
May 15 2018 13:48
@NyanKiyoshi What's the case, when you have some attributes, that you don't want to display? Is it only about getting filtering attributes shorter?
NyanKiyoshi
@NyanKiyoshi
May 15 2018 13:59
image.png
No. In our case, it's to do a full table of specs. Some can be filtered (from the sidebar on the category view), some not
Patryk Zawadzki
@patrys
May 15 2018 14:19
@Pacu2 think about a case where you have two attributes, cover type (soft, hard, leather bound) and number of pages, you want people to filter on one but only want to display the other
NyanKiyoshi
@NyanKiyoshi
May 15 2018 14:20
Good example
Simon Søllingvraa
@simsoll
May 15 2018 15:18
@NyanKiyoshi Makes sense - thanks :)
NyanKiyoshi
@NyanKiyoshi
May 15 2018 18:12
If you have a few minutes available, I would like some feedback on #2175, if that sounds okay or not for Saleor.
That would be great, thanks a lot :+1:
It's quite needed right now so the PR, so I will continue working on that tomorrow, and, thus, it will be fully done.
I also have one question: is doing as bellow against Mirumee coding style and structuring? Putting URLs as cached properties on models to make the code simpler and to avoid repetition
image.png
NyanKiyoshi
@NyanKiyoshi
May 15 2018 18:19
I fairly hate seeing (and doing) as bellow, it's quite a waste of CPU cycles, using cached properties would (should, because Python is quite unique when it comes to memory) be closer in the stack than acceding the URL function and then generating a new URL, so we should have a good chance to be hitting the CPU cache.
image.png