from products.models import Product, SeasonRegionMaterial


class ProductDBRouter(object):

    def db_for_read(self, model, **hints):
        if model == Product or model == SeasonRegionMaterial:
            return 'products'
        return None

    def db_for_write(self, model, **hints):
        if model == Product or model == SeasonRegionMaterial:
            return 'products'
        return None
