product search respects season & region

This commit is contained in:
2019-09-19 12:39:15 -07:00
parent da41a912b0
commit c964cc3abd
3 changed files with 39 additions and 21 deletions

View File

@ -1,14 +1,14 @@
from products.models import Product
from products.models import Product, SeasonRegionMaterial
class ProductDBRouter(object):
def db_for_read(self, model, **hints):
if model == Product:
if model == Product or model == SeasonRegionMaterial:
return 'products'
return None
def db_for_write(self, model, **hints):
if model == Product:
if model == Product or model == SeasonRegionMaterial:
return 'products'
return None