[mezzanine-users] Cartridge: Product filtering form

2015-01-10 Thread Maxim
Hello, I'm sure there should be some easy way to add products filtering(by product fields) form to products list view. It is quite common task. I tried to search and read documentation, but didn't find anything specific. What is the best way to implement this with cartridge? Thanks. -- You

Re: [mezzanine-users] Cartridge: Product filtering form

2015-01-10 Thread Stephen McDonald
Here's how you create a dict, mapping option types to options, which you could use to build your form, with fields option1, option2, etc options = defaultdict(list) for option in ProductOption.objects.all(): options[option%s % option.type].append(option.name) Then