'Take request so the template can use contextual macros that need it.
Renders the data for the locale specified by the request, but you can
override it by passing another in `locale`.'

def __init__(self, request, locale=None, mode=None, product=None):

    self.request = request
    self.locale = (locale or request.LANGUAGE_CODE)
    self.mode = (mode if (mode is not None) else self.default_mode)
    self.product = product
