auto_import make new recs without defaults !

16 views
Skip to first unread message

Dmitry Ermolaev

unread,
Jan 21, 2015, 10:55:11 AM1/21/15
to
If I use auto_import - and add new record - than receive None values instead default

    db = DAL("mysql:/....s", # 
        folder='applications/shop/databases',
        pool_size=3,
        auto_import=True,
        migrate_enabled = SETS.migrate_enabled,
        migrate=SETS.migrate,
        fake_migrate=SETS.fake_migrate,
        check_reserved=['all'],
        )
....
        Field('accuracy', 'integer', default = 2), # accuracy

not worked default ((

referenced fields too not show list 
    Field('curr_id', db.currs, readable=False),

Anthony

unread,
Jan 21, 2015, 11:30:14 AM1/21/15
to web...@googlegroups.com
The auto_import functionality is somewhat limited, as it only reads in the metadata from the *.table files, which only hold information relevant to the database (i.e., name, type, unique, not null, etc.). It does not import web2py specific attributes, such as defaults, validators, widgets, etc.

Anthony
Reply all
Reply to author
Forward
0 new messages