Skip to content

Commit 1f05730

Browse files
committed
better migration steps with dependencies to avoid errors.
Delete get_state_default of NomineePosition class because the migrate command fails. See ietf-tools#908 ietf-tools#909 - Legacy-Id: 5124
1 parent e088dce commit 1f05730

7 files changed

Lines changed: 498 additions & 105 deletions

File tree

ietf/dbtemplate/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class DBTemplateAdmin(admin.ModelAdmin):
7-
list_display = ('title', 'path', 'type', 'group')
7+
list_display = ('title', 'path',)
88
ordering = ('path', )
99

1010
admin.site.register(DBTemplate, DBTemplateAdmin)
Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<django-objects version="1.0">
3-
<object pk="1" model="dbtemplate.dbtemplate">
4-
<field type="CharField" name="path">/nomcom/defaults/home.rst</field>
5-
<field type="CharField" name="title">Home page of group</field>
6-
<field type="TextField" name="variables"></field>
7-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">rst</field>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<django-objects version="1.0">
3+
<object pk="1" model="dbtemplate.dbtemplate">
4+
<field type="CharField" name="path">/nomcom/defaults/home.rst</field>
5+
<field type="CharField" name="title">Home page of group</field>
6+
<field type="TextField" name="variables"></field>
7+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">rst</field>
88
<field type="TextField" name="content">Home page
99
=========
1010

11-
This is the home page of the nomcom group.</field>
12-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
13-
</object>
14-
<object pk="2" model="dbtemplate.dbtemplate">
15-
<field type="CharField" name="path">/nomcom/defaults/email/inexistent_person.txt</field>
16-
<field type="CharField" name="title">Email sent to chair of nomcom and secretariat when Email and Person are created if some of them don't exist</field>
17-
<field type="TextField" name="variables">$email: Newly created email
18-
$fullname: Fullname of the new person
19-
$person_id: Id of the new Person object
20-
$group: Name of the group</field>
21-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
22-
<field type="TextField" name="content">Hello,
23-
24-
A new person with name $fullname and email $email has been created. The new Person object has the following id: '$i'.
25-
26-
Please, check if there is some more action nedeed.</field>
27-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
28-
</object>
29-
<object pk="3" model="dbtemplate.dbtemplate">
30-
<field type="CharField" name="path">/nomcom/defaults/email/new_nominee.txt</field>
31-
<field type="CharField" name="title">Email sent to nominees when they are nominated</field>
32-
<field type="TextField" name="variables">$nominee: Full name of the nominee
33-
$position: Name of the position</field>
34-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
35-
<field type="TextField" name="content">Hello $nominee.
36-
37-
You have been nominated for $position.</field>
38-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
39-
</object>
40-
<object pk="4" model="dbtemplate.dbtemplate">
41-
<field type="CharField" name="path">/nomcom/defaults/email/new_nomination.txt</field>
42-
<field type="CharField" name="title">Email sent to nominators and secretariat when the nominators make the nominations</field>
43-
<field type="TextField" name="variables">$nominator: Full name of the nominator
44-
$email: Email of the nominator
45-
$nominee: Full name of the nominee
46-
$nominee_email: Email of the nominee
47-
$position: Nomination position</field>
48-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
49-
<field type="TextField" name="content">A new nomination have been received.
50-
51-
Nominator: $nominator &lt;$email&gt;
52-
Nominee: $nominee &lt;$email&gt;
53-
Position: $position</field>
54-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
55-
</object>
56-
<object pk="5" model="dbtemplate.dbtemplate">
57-
<field type="CharField" name="path">/nomcom/defaults/position/questionnaire.txt</field>
58-
<field type="CharField" name="title">Questionnaire sent to the nomine</field>
59-
<field type="TextField" name="variables">$nominee: Full name of the nomine
60-
$position: Position</field>
61-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
62-
<field type="TextField" name="content">Hi $nominee, please fill this questionnaire for the position $position:
63-
64-
Questionnaire</field>
65-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
66-
</object>
67-
<object pk="6" model="dbtemplate.dbtemplate">
68-
<field type="CharField" name="path">/nomcom/defaults/position/requirements.txt</field>
69-
<field type="CharField" name="title">Position requirements</field>
70-
<field type="TextField" name="variables">$position: Position</field>
71-
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
72-
<field type="TextField" name="content">These are the requirements for the position $position:
73-
74-
Requirements.</field>
75-
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
76-
</object>
11+
This is the home page of the nomcom group.</field>
12+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
13+
</object>
14+
<object pk="2" model="dbtemplate.dbtemplate">
15+
<field type="CharField" name="path">/nomcom/defaults/email/inexistent_person.txt</field>
16+
<field type="CharField" name="title">Email sent to chair of nomcom and secretariat when Email and Person are created if some of them don't exist</field>
17+
<field type="TextField" name="variables">$email: Newly created email
18+
$fullname: Fullname of the new person
19+
$person_id: Id of the new Person object
20+
$group: Name of the group</field>
21+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
22+
<field type="TextField" name="content">Hello,
23+
24+
A new person with name $fullname and email $email has been created. The new Person object has the following id: '$person_id'.
25+
26+
Please, check if there is some more action nedeed.</field>
27+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
28+
</object>
29+
<object pk="3" model="dbtemplate.dbtemplate">
30+
<field type="CharField" name="path">/nomcom/defaults/email/new_nominee.txt</field>
31+
<field type="CharField" name="title">Email sent to nominees when they are nominated</field>
32+
<field type="TextField" name="variables">$nominee: Full name of the nominee
33+
$position: Name of the position</field>
34+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
35+
<field type="TextField" name="content">Hello $nominee.
36+
37+
You have been nominated for $position.</field>
38+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
39+
</object>
40+
<object pk="4" model="dbtemplate.dbtemplate">
41+
<field type="CharField" name="path">/nomcom/defaults/email/new_nomination.txt</field>
42+
<field type="CharField" name="title">Email sent to nominators and secretariat when the nominators make the nominations</field>
43+
<field type="TextField" name="variables">$nominator: Full name of the nominator
44+
$email: Email of the nominator
45+
$nominee: Full name of the nominee
46+
$nominee_email: Email of the nominee
47+
$position: Nomination position</field>
48+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
49+
<field type="TextField" name="content">A new nomination have been received.
50+
51+
Nominator: $nominator &lt;$email&gt;
52+
Nominee: $nominee &lt;$email&gt;
53+
Position: $position</field>
54+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
55+
</object>
56+
<object pk="5" model="dbtemplate.dbtemplate">
57+
<field type="CharField" name="path">/nomcom/defaults/position/questionnaire.txt</field>
58+
<field type="CharField" name="title">Questionnaire sent to the nomine</field>
59+
<field type="TextField" name="variables">$nominee: Full name of the nomine
60+
$position: Position</field>
61+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
62+
<field type="TextField" name="content">Hi $nominee, please fill this questionnaire for the position $position:
63+
64+
Questionnaire</field>
65+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
66+
</object>
67+
<object pk="6" model="dbtemplate.dbtemplate">
68+
<field type="CharField" name="path">/nomcom/defaults/position/requirements.txt</field>
69+
<field type="CharField" name="title">Position requirements</field>
70+
<field type="TextField" name="variables">$position: Position</field>
71+
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
72+
<field type="TextField" name="content">These are the requirements for the position $position:
73+
74+
Requirements.</field>
75+
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>
76+
</object>
7777
</django-objects>

0 commit comments

Comments
 (0)