From d65987b9353b1f9a65cdce4caa925eeec2b4b610 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Wed, 2 Dec 2015 17:01:10 +0000 Subject: [PATCH] Improve the questionnaire templates, reminding the nominee that receiving the questionnaire does not imply they have accepted the nomination. Fixes #1807. - Legacy-Id: 10534 --- ...improve_default_questionnaire_templates.py | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ietf/nomcom/migrations/0006_improve_default_questionnaire_templates.py diff --git a/ietf/nomcom/migrations/0006_improve_default_questionnaire_templates.py b/ietf/nomcom/migrations/0006_improve_default_questionnaire_templates.py new file mode 100644 index 000000000..f244ba969 --- /dev/null +++ b/ietf/nomcom/migrations/0006_improve_default_questionnaire_templates.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +def set_new_template_content(apps, schema_editor): + DBTemplate = apps.get_model('dbtemplate','DBTemplate') + + h = DBTemplate.objects.get(path='/nomcom/defaults/position/header_questionnaire.txt') + h.content = """Hi $nominee, this is the questionnaire for the position $position. +Please follow the directions in the questionnaire closely - you may see +that some changes have been made from previous years, so please take note. + +We look forward to reading your questionnaire response! If you have any +administrative questions, please send mail to nomcom-chair@ietf.org. + +You may have received this questionnaire before accepting the nomination. A +separate message, sent at the time of nomination, provides instructions for +indicating whether you accept or decline. If you have not completed those +steps, please do so as soon as possible, or contact the nomcom chair. + +Thank you! + + +""" + h.save() + + h = DBTemplate.objects.get(path='/nomcom/defaults/position/questionnaire.txt') + h.content = """NomCom Chair: Replace this content with the appropriate questionnaire for the position $position. +""" + h.save() + +def revert_to_old_template_content(apps, schema_editor): + DBTemplate = apps.get_model('dbtemplate','DBTemplate') + + h = DBTemplate.objects.get(path='/nomcom/defaults/position/header_questionnaire.txt') + h.content = """Hi $nominee, this is the questionnaire for the position $position. +Please follow the directions in the questionnaire closely - you may see +that some changes have been made from previous years, so please take note. + +We look forward to reading your questionnaire response! If you have any +administrative questions, please send mail to nomcom-chair@ietf.org. + +Thank you! + + +""" + h.save() + + h = DBTemplate.objects.get(path='/nomcom/defaults/position/questionnaire.txt') + h.content = """Enter here the questionnaire for the position $position: + +Questionnaire + +""" + h.save() + +class Migration(migrations.Migration): + + dependencies = [ + ('nomcom', '0005_remove_position_incumbent'), + ] + + operations = [ + migrations.RunPython(set_new_template_content,revert_to_old_template_content) + ]