[web2py] Re: Displaying images

2017-05-08 Thread Dave S
On Sunday, May 7, 2017 at 11:16:32 AM UTC-7, Matt Bockman wrote: > > How big is your application/user base? > At the moment, 1. > Is sqlite not sufficient? > sqlite works quite well for me. But there are applications where it won't scale, mainly because of the locking mechanism. I would ra

[web2py] Re: widget.autocomplet vs IS_IN_DB : formatting, filtering

2017-05-08 Thread Brian M
I've used bootstrap-select ( https://silviomoreto.github.io/bootstrap-select/examples/ ) to enhance standard select drop down lists and allow live searching. Would work well with your lists ofbecause the user can just type in part of any one of them and the options automatically filter down

[web2py] Validate_and_insert fails because "id" has no value

2017-05-08 Thread Joe Barnhart
So I'm using "validate_and_insert" to, well, validate and insert some values. Its a simple function and easily understood: def validate_and_insert(self, **fields): response, new_fields = self._validate_fields(fields) if not response.errors: response.id = self.inse

[web2py] Re: cache configuration in appconfig

2017-05-08 Thread 黄祥
ah, you are right my bad, different variable name thanks and best regards, stifan -- 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 messa

[web2py] Manual error regarding "hidden" fields

2017-05-08 Thread Joe Barnhart
In the section about SQLFORM, the description of hidden fields is demonstrably wrong. The code example is: form.vars.a = request.vars.a form = SQLFORM(..., hidden=dict(a='b')) Since the variable "form" is created on the second line, it is not available on the first as the target of an assignm

[web2py] Re: cache configuration in appconfig

2017-05-08 Thread Anthony
You've got memcache_servers in your app code but memcached_servers in the ini file. Anthony On Monday, May 8, 2017 at 11:27:48 AM UTC-4, 黄祥 wrote: > > *case 1* > *models/db.py* > from gluon.contrib.memcache import MemcacheClient > memcache_servers = myconf.get(myconf_env + '_' + 'cache.memcache_

[web2py] cache configuration in appconfig

2017-05-08 Thread 黄祥
*case 1* *models/db.py* from gluon.contrib.memcache import MemcacheClient memcache_servers = myconf.get(myconf_env + '_' + 'cache.memcache_servers') cache.memcache = MemcacheClient(request, memcache_servers) auth.settings.actions_disabled = myconf.get(myconf_env + '_' + 'auth.actions_disabled')

[web2py] Re: flash message gets lost

2017-05-08 Thread Anthony
On Monday, May 8, 2017 at 5:08:59 AM UTC-4, Yebach wrote: > > Flash is show on my index page so the position class="flash">{{=session.flash > or ''}} is ok > I just put session.flash('Some random text') in my index function and it > works > session.flash is not intended to work that way. You us

Re: [web2py] default search widget from SQLFORM.grid only searches the reference field by id but not format=''

2017-05-08 Thread Rudy
Richard, thanks again for sharing your advises, much appreciate them. On Tuesday, May 2, 2017 at 11:27:38 PM UTC+8, Richard wrote: > > Ok, I recall... It very sad that the search widget wouldn't be more > helpful... In the past I ask for a way to obfuscated the backend field > name, rname featur

[web2py] Re: default search widget from SQLFORM.grid only searches the reference field by id but not format=''

2017-05-08 Thread Rudy
Hi Anthony, Thanks for your advises, I'll try the searchable argument function first to leverage the built in search widget, i do find it very handy. On Wednesday, May 3, 2017 at 12:36:15 AM UTC+8, Anthony wrote: > > The grid takes a "searchable" argument, which can be a function that > generat

[web2py] Re: flash message gets lost

2017-05-08 Thread Yebach
Flash is show on my index page so the position {{=session.flash or ''}} is ok I just put session.flash('Some random text') in my index function and it works But after registration the message is not shown My code for user registration in index.py user if request.args(0) == 'register': #fo