def render_index(template_data): index_template = load_or_die('templates', 'index.htmpl') year, season = template_data.data['main']['Current Show'].split('/') graphic = shows.get_show_graphic(year, season) current_show_data = load_or_die('site', year, season, 'show.yaml') current_show_data.update({'year': year, 'season': season, 'graphic': graphic}) index_data = deepcopy(template_data) index_data.bind('show', current_show_data) rendered = evaluate_template(index_template, index_data) write(index_data, 'MIT Musical Theatre Guild', rendered, 'site', 'index.html')
def render_directions(template_data): directions_template = load_or_die('templates', 'directions.htmpl') rendered = evaluate_template(directions_template, template_data) write(template_data, 'MTG - Directions', rendered, 'site', 'directions.html')
def render_contact(template_data): contact_template = load_or_die('templates', 'contact.htmpl') rendered = evaluate_template(contact_template, template_data) write(template_data, 'MTG - Contact Us', rendered, 'site', 'contact.html')
def render_about(template_data): about_template = load_or_die('templates', 'about.htmpl') rendered = evaluate_template(about_template, template_data) write(template_data, 'MTG - About MTG', rendered, 'site', 'about.html')
def render_faq(template_data): faq_template = load_or_die('templates', 'faq.htmpl') rendered = evaluate_template(faq_template, template_data) write(template_data, 'MTG - Frequently Asked Questions', rendered, 'site', 'faq.html')