List also variables added by template_on_formdata

This commit is contained in:
Benjamin Dauvergne 2011-06-21 20:07:22 +00:00
parent bc531fcd63
commit eff0600970
1 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,13 @@ def lax_int(s):
return -1
ADDITIONAL_VARIABLES = (
('url', _('URL of the form')),
('url_status', _('URL of the form status')),
('details', _('Full details of the form')),
('name', _('Form type')),
('number', _('Form number')))
def get_varnames(fields):
'''Extract variable names for helping people fill their templates.
@ -59,6 +66,7 @@ def get_varnames(fields):
varnames.append(('f%s' % field.id, label))
# and finally add it as its manually defined variable name
varnames.extend(ADDITIONAL_VARIABLES)
return varnames