Appadmin not showing default widgets for plugin tables

43 views
Skip to first unread message

Alan Etkin

unread,
Aug 19, 2012, 2:48:42 PM8/19/12
to web...@googlegroups.com
I think this is got to have something to do with changes in trunk, for the behavior has changed since 1.99.7 stable

When editing plugin tables with appadmin, some default widgets (as for example those for reference or list:reference field types) are not being shown. The page returns only tex inputs. Anyone with this problem?

Massimo Di Pierro

unread,
Aug 19, 2012, 2:54:42 PM8/19/12
to web...@googlegroups.com
Can you make a more concrete example?

Alan Etkin

unread,
Aug 19, 2012, 3:16:47 PM8/19/12
to web...@googlegroups.com
Can you make a more concrete example?


A table definition

db.define_table("plugin_pyodel_attendance",
 
Field("student", "reference auth_user",
 
default=auth.user_id),
 
Field("course", "reference plugin_pyodel_course"),
 
Field("paid", "double", default=0.0),
 
Field("allowed", "boolean", default=False),
 
Field("passed", default=False),
 
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?

plugin-appadmin-no-widgets.png

Massimo Di Pierro

unread,
Aug 19, 2012, 4:02:41 PM8/19/12
to web...@googlegroups.com
Thanks. Fixed.

scausten

unread,
Sep 12, 2012, 11:28:50 AM9/12/12
to web...@googlegroups.com
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!

Niphlod

unread,
Sep 12, 2012, 12:07:48 PM9/12/12
to web...@googlegroups.com
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 ?

scausten

unread,
Sep 13, 2012, 4:53:44 AM9/13/12
to web...@googlegroups.com
Ah, of course, thank you.
Reply all
Reply to author
Forward
0 new messages