Add field and show that field when creating new item

14 views
Skip to first unread message

K Dos

unread,
Mar 24, 2021, 1:09:54 PM3/24/21
to Sahana-Eden

I try to add a new field in Organisations.

I edit the /modules/s3db/org.py file and add the following lines in define_table function:

 Field("customfield",
     label = T("Custom Field"),
     readable = True,
     writable = True,
 ),


While I can see the changes in my Postgres DB (the field is created in org_organisation table), when creating a new organisation (/eden/org/organisation/create), the field does not appear in the form. Any suggestions?

Thanks in advance!

Fran Boon

unread,
Mar 24, 2021, 1:31:32 PM3/24/21
to Sahana Software Foundation
The org_organisation resource has a crud_form defined to define which
fields to include...from this table & associated tables:
https://github.com/sahana/eden/blob/master/modules/s3db/org.py#L632

Best Wishes,
Fran.
> --
> You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sahana-eden...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sahana-eden/a7c55db7-c1a7-4532-9445-ffa100b15831n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages