datatracker/ietf/dbtemplate/migrations/0006_adjust_feedback_receipt_template.py

57 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-24 14:54
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_migration):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
t.variables="""$about: What this feedback is about
$comments: Comments on whatever the feedback is about
"""
t.content="""Hi,
Your input regarding $about has been received and registered.
The following comments have been registered:
--------------------------------------------------------------------------
$comments
--------------------------------------------------------------------------
Thank you,
"""
t.save()
def reverse(apps, schema_migration):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
t.variables="""$nominee: Full name of the nominee
$position: Nomination position
$comments: Comments on this candidate
"""
t.content="""Hi,
Your input regarding $nominee for the position of
$position has been received and registered.
The following comments have been registered:
--------------------------------------------------------------------------
$comments
--------------------------------------------------------------------------
Thank you,
"""
t.save()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0005_add_default_topic_description'),
]
operations = [
migrations.RunPython(forward, reverse)
]