Skip to content

Commit 4813177

Browse files
committed
Allow the nomcom to collect feedback on arbitrary topics. Fixes ietf-tools#2256 and ietf-tools#1846. Commit ready for merge.
- Legacy-Id: 13474
1 parent 92b1c30 commit 4813177

26 files changed

+7516
-6599
lines changed

ietf/dbtemplate/fixtures/nomcom_templates.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,14 @@ The questionaire is repeated below for your convenience.
172172
--------</field>
173173
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
174174
</object>
175+
<object pk="12" model="dbtemplate.dbtemplate">
176+
<field type="CharField" name="path">/nomcom/defaults/topic/description</field>
177+
<field type="CharField" name="title">Description of Topic</field>
178+
<field type="TextField" name="variables">$topic: Topic'</field>
179+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">rst</field>
180+
<field type="TextField" name="content">This is a description of the topic "$topic"
181+
182+
Describe the topic and add any information/instructions for the responder here.
183+
</field>
184+
</object>
175185
</django-objects>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.10.7 on 2017-05-24 09:30
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations
6+
7+
def forward(apps, schema_editor):
8+
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
9+
DBTemplate.objects.create(
10+
path='/nomcom/defaults/topic/description',
11+
title='Description of Topic',
12+
variables='$topic: Topic',
13+
type_id='rst',
14+
content="""This is a description of the topic "$topic"
15+
16+
Describe the topic and add any information/instructions for the responder here.
17+
""",
18+
)
19+
20+
def reverse(apps, schema_editor):
21+
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
22+
DBTemplate.objects.filter(path='/nomcom/defaults/topic/description').delete()
23+
24+
class Migration(migrations.Migration):
25+
26+
dependencies = [
27+
('dbtemplate', '0004_team_review_content_templates'),
28+
]
29+
30+
operations = [
31+
migrations.RunPython(forward,reverse),
32+
]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.10.7 on 2017-05-24 14:54
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations
6+
7+
def forward(apps, schema_migration):
8+
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
9+
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
10+
t.variables="""$about: What this feedback is about
11+
$comments: Comments on whatever the feedback is about
12+
"""
13+
t.content="""Hi,
14+
15+
Your input regarding $about has been received and registered.
16+
17+
The following comments have been registered:
18+
19+
--------------------------------------------------------------------------
20+
$comments
21+
--------------------------------------------------------------------------
22+
23+
Thank you,
24+
"""
25+
t.save()
26+
27+
def reverse(apps, schema_migration):
28+
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
29+
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
30+
t.variables="""$nominee: Full name of the nominee
31+
$position: Nomination position
32+
$comments: Comments on this candidate
33+
"""
34+
t.content="""Hi,
35+
36+
Your input regarding $nominee for the position of
37+
$position has been received and registered.
38+
39+
The following comments have been registered:
40+
41+
--------------------------------------------------------------------------
42+
$comments
43+
--------------------------------------------------------------------------
44+
45+
Thank you,
46+
"""
47+
t.save()
48+
class Migration(migrations.Migration):
49+
50+
dependencies = [
51+
('dbtemplate', '0005_add_default_topic_description'),
52+
]
53+
54+
operations = [
55+
migrations.RunPython(forward, reverse)
56+
]

0 commit comments

Comments
 (0)