Do now show non input fields in the list of available variables for model files

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

View File

@ -30,6 +30,7 @@ from quixote.html import htmltext
from wcs.roles import Role, logged_users_role, get_user_roles
from wcs.formdata import Evolution
from wcs.fields import SubtitleField, TitleField, CommentField, PageField
if not __name__.startswith('wcs.') and not __name__ == "__main__":
raise ImportError('Import of workflows module must be absolute (import wcs.workflows)')
@ -48,6 +49,8 @@ def get_varnames(fields):
'''
varnames = []
for field in fields:
if isinstance(field, (SubtitleField, TitleField, CommentField, PageField)):
continue
# add it as f$n$
label = field.label
if field.varname: