product search respects season & region
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user