format is missing for the clients table ..... how should web2py show the clients records in the dropdown of the "newly/currently editing" record of promotions ?
Il giorno mercoledì 12 settembre 2012 17:28:50 UTC+2, scausten ha scritto: > > I'm having the same trouble with the following table definition (version > 2.0.8) > > db.define_table('clients', > Field('name')) > > db.define_table('promotions', > Field('client', 'reference clients'), > Field('name'), > Field('starts_on', 'datetime'), > Field('ends_on', 'datetime')) > > I'm not getting a dropdown for promotions.client in appadmin or other > SQLFORMs without explicitly specifying requires=IS_IN_DB(...) > > Thanks in advance! > > On Sunday, 19 August 2012 21:02:41 UTC+1, Massimo Di Pierro wrote: >> >> Thanks. Fixed. >> >> On Sunday, 19 August 2012 14:16:47 UTC-5, Alan Etkin wrote: >>> >>> Can you make a more concrete example? >>>> >>>> >>> A table definition >>> >>> db.define_table("plugin_pyodel_attendance", >>> Field <http://localhost:8000/examples/global/vars/Field>("student", >>> "reference auth_user", >>> default=auth.user_id), >>> Field <http://localhost:8000/examples/global/vars/Field>("course", >>> "reference plugin_pyodel_course"), >>> Field <http://localhost:8000/examples/global/vars/Field>("paid", "double", >>> default=0.0), >>> Field <http://localhost:8000/examples/global/vars/Field>("allowed", >>> "boolean", default=False), >>> Field <http://localhost:8000/examples/global/vars/Field>("passed", >>> default=False), >>> Field <http://localhost:8000/examples/global/vars/Field>("score", >>> "double"), >>> format="%(student)s" >>> ) >>> >>> I have previously inserted two users with the registration feature. >>> I attached a screenshot with the appadmin insert form view output. >>> For my understanding, the form should by default present a combo widget for >>> the student field >>> >>> Perhaps I could look for validators defined elsewhere but I'm pretty sure >>> I'm not using them. >>> No big deal if the problem is only for appadmin but would'n there be >>> similar problems with default forms when using crud, etc? >>> >>> --