From b34b8be0b54332ff5e87e09ed80ed20b1820b04c Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 10 Nov 2017 19:18:49 -0600 Subject: [PATCH] better _structure --- pydal/objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pydal/objects.py b/pydal/objects.py index 968888250..2bc068812 100644 --- a/pydal/objects.py +++ b/pydal/objects.py @@ -379,7 +379,8 @@ def fields(self): return self._fields def _structure(self): - keys = ['name','type','writable','listable','searchable','regex','options','default'] + keys = ['name','type','writable','listable','searchable','regex','options', + 'default','label','unique','notnull','required'] def noncallable(obj): return obj if not callable(obj) else None return [{key: noncallable(getattr(field, key)) for key in keys} for field in self if field.readable and not field.type=='password']