These are chat archives for mirumee/saleor

29th
Jun 2018
maltitco
@maltitco
Jun 29 2018 11:02
How to add a product to several categories?
Patryk Zawadzki
@patrys
Jun 29 2018 11:04
you can add it to multiple collections but there is always one category
maltitco
@maltitco
Jun 29 2018 11:06
In that case, I have to rethink the whole structure from scratch, I still have the habits of Magento...
Patryk Zawadzki
@patrys
Jun 29 2018 11:12
API partners like Google Merchant and Amazon expect one category for each product
maltitco
@maltitco
Jun 29 2018 11:13
Whatever it is, I have to start thinking like SALEOR :)
NyanKiyoshi
@NyanKiyoshi
Jun 29 2018 14:24

Should we go to merge the Python37 support (https://github.com/mirumee/saleor/compare/master...NyanKiyoshi:python37-support) when PyYaml 4.2 will be released despite travis-ci still using the release of January? Tests are (were) passing without issues with the updated requirements.

Tests are currently failing because PyYaml released a broken version (4.1) in PyPi which was needed for Python37 support (yaml/pyyaml#192)

The possible issue is that quite some people will encounter issues with Saleor if they get to use the 3.7 instead of 3.6 or previous.

Patryk Zawadzki
@patrys
Jun 29 2018 14:55
let’s not rush into this and see if other problems arise
Joshua Fialkoff
@jfialkoff
Jun 29 2018 17:53
Could someone explain to me how you're handling the creation of new permissions. I see some migrations with AlterModelOptions calls but I can't figure out how that migration is created or how it results in the permissions persisting.
NyanKiyoshi
@NyanKiyoshi
Jun 29 2018 18:10
It's a enum if I recall correctly
You also have to edit the permission list and create migrations (manage.py makemigrations); if it can help you. I have to check how it works again, especially has it quite changed recently
NyanKiyoshi
@NyanKiyoshi
Jun 29 2018 18:22

Inside each model, you have a Meta class that contains a permission list (identifier, verbose_name)

(e.g.: in saleor.order.Order)

Then you have to add them to saleor.core.permissions (model_name.permission_identifier)

And PermissionMixin is managing the permissions (model User of saleor.account), which is using a enum, and to update it you have to run the makemigrations command to generate a updated enum, and thus, then, run migrate

I think that was that, I am really not sure as I don't have the code under my eyes. I hope it will help you find what you are looking for :)
Ousmane Seidy Diallo
@TheBlackDude
Jun 29 2018 21:00
Hi Guys
Please i asked a question above on how to run the tests with the Docker setup, I can't run the tests am getting an error
I really want to contribute to this project
Yunaz Gilang Ramadhan
@YunazGilang
Jun 29 2018 22:08
Hi, does anyone know how can we get the models get_absolute_url as a string instead of a function instance?, i want to pass it to JSONResponse