That page loads very fast. All that queries (more then 100) don't execute
on one pages, therefore I asked what is thats queries. All of them contains
in my app but in different functions. I use cache for first 8 queries like
that:
if not 'edu_lvl' in globals():
def getConst():
edu_lvl = {rec.id:rec.name for rec in db(db.s_edu_level).select(db.
s_edu_level.id,db.s_edu_level.name)}
edu_inst={rec.id:rec.name for rec in db(db.s_edu_inst).select(db.
s_edu_inst.id,db.s_edu_inst.name)}
hostel={rec.id:rec.name for rec in db(db.s_hostel).select(db.
s_hostel.id,db.s_hostel.name)}
medal={rec.id:rec.name for rec in db(db.s_medal).select(db.s_medal.
id,db.s_medal.name)}
region={rec.id:rec.name for rec in db(db.s_region).select(db.
s_region.id,db.s_region.name)}
country={rec.id:rec.name for rec in db(db.s_country).select(db.
s_country.id,db.s_country.name)}
kladr_type={rec.id:rec.name for rec in db(db.s_kladr_loc_type).
select(db.s_kladr_loc_type.id,db.s_kladr_loc_type.name)}
vuzName=db(db.t_const.name == 'VUZ_KR').select(db.t_const.text).
first()
return edu_lvl,edu_inst,hostel,medal,region,country,kladr_type,
vuzName
edu_lvl,edu_inst,hostel,medal,region,country,kladr_type,vuzName = cache.
ram('consts', lambda: getConst(), time_expire=60*60*24)
Moreover that queries belong different users. It's reason why quantity of
them more then 100. I thought that it's queries for period of time.
About my last questions, I wanted to write: are there way to put buttons in
row like on picture.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/e4a26ab2-3d30-4931-b418-dc72e7348635%40googlegroups.com.