Added request parameter to populate_template_dict