def render_page(self, template_file_name, content_template_values, template_path=None):
        """This re-renders the full page with the specified template."""
        user = self.get_user()

        template_values = {
            'URL'  : URL,
            'user' : user
        }
        merged_values = dict(template_values)
        merged_values.update(content_template_values)
        
        path = os.path.join('templates/', template_file_name)
        
        app_path = self.get_app_path()

        if template_path != None:
            logging.info('got template_path: %s' % template_path)
            path = os.path.join(template_path, path)
        elif app_path != None:
            path = os.path.join(app_path, path)

        # Make sure the cookie is always set.
        if user:
            set_user_cookie( self, user.uuid )

        logging.info("Rendering %s" % path )
        self.response.headers.add_header('P3P', P3P_HEADER)
        return render(path, merged_values)
    def render_page(self, template_file_name, content_template_values, template_path=None):
        """This re-renders the full page with the specified template."""
        store = self.get_store()

        template_values = {
            'URL'   : URL,
            'store' : store
        }
        merged_values = dict(template_values)
        merged_values.update(content_template_values)
        
        path = os.path.join('templates/', template_file_name)
        
        app_path = self.get_app_path()

        if template_path != None:
            logging.info('got template_path: %s' % template_path)
            path = os.path.join(template_path, path)
        elif app_path != None:
            path = os.path.join(app_path, path)

        logging.info("Rendering %s" % path )
        self.response.headers.add_header('P3P', P3P_HEADER)
        return render(path, merged_values)