From: Jeff K. <jt...@ya...> - 2005-11-28 21:37:18
|
Rob Miller wrote: >> http://plone.org/development/teams/developer/groups/issues/233 > in any event, the best way to introspect the schema that is being used > for your member objects is probably via 'zopectl debug'. you can get > any member object and call 'member.Schema().fields()' to see the field > objects, and 'member.getField(fieldname)' to get a single field to > examine in detail. This is interesting, should there be a difference between .schema and .Schema()? Notice the lone occurence of ext_editor in the ipython zopectl debug session below (last line): In [1]: mem = app.PloneMember.portal_memberdata['jeffk'] In [4]: mem.schema.fields() Out[4]: [<Field id(string:rw)>, <Field title(computed:r)>, <Field fullname(string:rw)>, <Field email(string:rw)>, <Field wysiwyg_editor(string:rw)>, <Field portal_skin(string:rw)>, <Field portrait(image:rw)>, <Field visible_ids(boolean:rw)>, <Field home_page(string:rw)>, <Field location(string:rw)>, <Field language(string:rw)>, <Field description(text:rw)>, <Field password(string:w)>, <Field confirm_password(string:w)>, <Field mail_me(boolean:w)>, <Field roles(lines:rw)>, <Field groups(lines:rw)>, <Field domains(lines:rw)>, <Field review_state(computed:r)>, <Field login_time(datetime:rw)>, <Field last_login_time(datetime:rw)>, <Field allowDiscussion(string:rw)>, <Field subject(lines:rw)>, <Field contributors(lines:rw)>, <Field creators(lines:rw)>, <Field effectiveDate(datetime:rw)>, <Field expirationDate(datetime:rw)>, <Field rights(text:rw)>, <Field creation_date(datetime:rw)>, <Field modification_date(datetime:rw)>] In [6]: mem.schema.getSchemataNames() Out[6]: ['default', 'metadata'] In [7]: mem.schema.getSchemataFields('default') Out[7]: [<Field id(string:rw)>, <Field title(computed:r)>, <Field fullname(string:rw)>, <Field email(string:rw)>, <Field wysiwyg_editor(string:rw)>, <Field portal_skin(string:rw)>, <Field portrait(image:rw)>, <Field visible_ids(boolean:rw)>, <Field home_page(string:rw)>, <Field location(string:rw)>, <Field language(string:rw)>, <Field description(text:rw)>, <Field password(string:w)>, <Field confirm_password(string:w)>, <Field mail_me(boolean:w)>, <Field roles(lines:rw)>, <Field groups(lines:rw)>, <Field domains(lines:rw)>, <Field review_state(computed:r)>, <Field login_time(datetime:rw)>, <Field last_login_time(datetime:rw)>] In [8]: sc = mem.Schema() In [9]: sc.getSchemataNames() Out[9]: ['default', 'metadata'] In [10]: sc.getSchemataFields('default') Out[10]: [<Field id(string:rw)>, <Field title(computed:r)>, <Field fullname(string:rw)>, <Field email(string:rw)>, <Field wysiwyg_editor(string:rw)>, <Field portal_skin(string:rw)>, <Field portrait(image:rw)>, <Field visible_ids(boolean:rw)>, <Field home_page(string:rw)>, <Field location(string:rw)>, <Field language(string:rw)>, <Field password(string:w)>, <Field confirm_password(string:w)>, <Field mail_me(boolean:w)>, <Field roles(lines:rw)>, <Field groups(lines:rw)>, <Field domains(lines:rw)>, <Field review_state(computed:r)>, <Field login_time(datetime:rw)>, <Field last_login_time(datetime:rw)>, <Field description(string:rw)>, <Field ext_editor(boolean:rw)>] |