Problem count

This commit is contained in:
Piotr Mitros
2012-02-07 21:07:57 -05:00
parent 4a664d88cd
commit d44a81f4a9

View File

@@ -7,7 +7,8 @@ class textline(object):
@staticmethod
def render(element, value, state):
eid=element.get('id')
context = {'id':eid, 'value':value, 'state':state}
count = int(eid.split('_')[-2])-1 # HACK
context = {'id':eid, 'value':value, 'state':state, 'count':count}
html=render_to_string("textinput.html", context)
return etree.XML(html)