Skip to content

Commit ebef741

Browse files
committed
Resolved a naming conflict between the builtin messages framework and a variable named messages in wgcharter.views.change_state. Fixes issue ietf-tools#901.
- Legacy-Id: 5061
1 parent 0e67b2c commit ebef741

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

ietf/templates/wgcharter/change_state.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h3>Or revert to previous state</h3>
8989

9090
{% block content_end %}
9191
<script type="text/javascript">
92-
var messages = {{ messages|safe }},
92+
var info_msg = {{ info_msg|safe }},
9393
statesForBallotWoExtern = {{ states_for_ballot_wo_extern }};
9494
</script>
9595
<script type="text/javascript" src="/js/charter-change-state.js"></script>

ietf/wgcharter/views.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from ietf.wgcharter.mails import *
2828
from ietf.wgcharter.utils import *
2929

30+
import debug
3031

3132
class ChangeStateForm(forms.Form):
3233
charter_state = forms.ModelChoiceField(State.objects.filter(type="charter", slug__in=["infrev", "intrev", "extrev", "iesgrev"]), label="Charter state", empty_label=None, required=False)
@@ -177,14 +178,25 @@ def change_state(request, name, option=None):
177178
def state_pk(slug):
178179
return State.objects.get(type="charter", slug=slug).pk
179180

180-
messages = {
181+
info_msg = {
181182
state_pk("infrev"): 'The WG "%s" (%s) has been set to Informal IESG review by %s.' % (wg.name, wg.acronym, login.plain_name()),
182183
state_pk("intrev"): 'The WG "%s" (%s) has been set to Internal review by %s.\nPlease place it on the next IESG telechat and inform the IAB.' % (wg.name, wg.acronym, login.plain_name()),
183184
state_pk("extrev"): 'The WG "%s" (%s) has been set to External review by %s.\nPlease send out the external review announcement to the appropriate lists.\n\nSend the announcement to other SDOs: Yes\nAdditional recipients of the announcement: ' % (wg.name, wg.acronym, login.plain_name()),
184185
}
185186

186187
states_for_ballot_wo_extern = State.objects.filter(type="charter", slug="intrev").values_list("pk", flat=True)
187188

189+
190+
debug.show('repr(form)')
191+
debug.show('wg.charter')
192+
debug.show('login')
193+
debug.show('option')
194+
debug.show('prev_charter_state')
195+
debug.show('title')
196+
debug.show('initial_review')
197+
debug.show('chartering_type')
198+
debug.show('simplejson.dumps(info_msg)')
199+
188200
return render_to_response('wgcharter/change_state.html',
189201
dict(form=form,
190202
doc=wg.charter,
@@ -194,7 +206,7 @@ def state_pk(slug):
194206
title=title,
195207
initial_review=initial_review,
196208
chartering_type=chartering_type,
197-
messages=simplejson.dumps(messages),
209+
info_msg=simplejson.dumps(info_msg),
198210
states_for_ballot_wo_extern=simplejson.dumps(list(states_for_ballot_wo_extern)),
199211
),
200212
context_instance=RequestContext(request))

0 commit comments

Comments
 (0)