pydal add_field?

18 views
Skip to first unread message

Lucas

unread,
Feb 9, 2026, 10:29:06 AM (2 days ago) Feb 9
to py4web
hello one and all,

I do not think this exists but can an add_field('field_name', 'type', default=xx, requires=xx, comment=xx, etc.) function be added to db.tables['table_name']?

this would also make it easier to add custom fields after auth initiated auth_user, auth_user_tag_groups, etc.

thank you in advance, lucas

Dave S

unread,
Feb 9, 2026, 5:08:12 PM (2 days ago) Feb 9
to py4web
I thought this capability already existed, without requiring a new function.  Can't you simply do

table.fields["new_field"] = FIELD(('type': 'text'),('default': xx), ('requires': 'IS_XX'),('comment':xx))

ISTR doing this in web2py.

/dps


Reply all
Reply to author
Forward
0 new messages