Do you have a many provinces in database?

IS_IN_DB(db, db.provinces.id, '%(name)s'))

may be trying to build a huge dropdown

On Feb 28, 12:17 pm, Bruce Wade <[email protected]> wrote:
> Hi,
>
> Lately I have found the appadmin completely freezing my entire computer.
> Even when I try to view the errors log my system hangs. Deleting all
> contents from the errors folder fixes this problem, however also defeats
> the purpose of having error logs :D
>
> Another issue I have a small not very complex table
>
> db.define_table('ads',
>     Field('member_id', db.user_account),
>     Field('points', 'integer', default=0),
>     Field('url', unique=True, requires=[IS_NOT_IN_DB(db, 'ads.url'),
> IS_URL()]),
>     Field('language', requires = IS_IN_DB(db, db.languages.code,
> '%(language)s')),
>     Field('location'),
>     Field('country', 'reference countries', requires = IS_IN_DB(db,
> db.countries.id, '%(name)s')),
>     Field('province', 'reference provinces', requires = IS_IN_DB(db,
> db.provinces.id, '%(name)s')),
>     Field('city', 'reference cities', requires = IS_IN_DB(db, db.cities.id,
> '%(name)s')),
>     Field('accepted', 'boolean', default=False),
>     Field('viewable', 'boolean', default=True),
>     Field('updated_at', 'datetime', default=request.now),
>     Field('added_at', 'datetime', default=request.now),
>     migrate=False
> )
>
> Which has 328 entries (very small amount) view this db table's records with
> the admin app isn't a problem. However when I then click on an ID for a
> record after waiting for a minute my entire OS locks up. Any suggests on
> where to look about this major bottle neck?
>
> --
> --
> Regards,
> Bruce 
> Wadehttp://ca.linkedin.com/in/brucelwadehttp://www.wadecybertech.comhttp://www.warplydesigned.comhttp://www.fitnessfriendsfinder.com

Reply via email to