List also variables added by template_on_formdata
This commit is contained in:
parent
bc531fcd63
commit
eff0600970
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue