I have some old code that uses a custom search function in a sqlform.grid -
something along the lines:
def process_filtered(sfields, keywords):
search_query = SQLFORM.build_query(sfields, keywords)
[...]
return search_query
grid = SQLFORM.grid(db.doc_scan_details, searchable=process_filtered)
gt; functionality you retained.
>
> Anthony
>
>
> On Tuesday, May 3, 2016 at 11:47:26 AM UTC-4, Krzysztof Socha wrote:
>>
>> Worked! Thanks!
>>
>> BTW: I keep running into issues when updating old web2py applications to
>> new releases of web2py... Is
.
On Tuesday, May 3, 2016 at 5:31:52 PM UTC+2, Anthony wrote:
>
> In layout.html, have you tried changing the class of the flash div from
> "flash" to "w2p_flash"?
>
> Anthony
>
> On Tuesday, May 3, 2016 at 11:22:07 AM UTC-4, Krzysztof Socha wrote:
>>
>
I have issues with showing "flash"-type messages recently. First I could
not get them to show at all. I updated several files in my application
based on the recent version of web2py (R-2.14.5), such as web2py.js,
web2py-ajax.html, and the like.
Now it shows the flash message, but the
ing when using @cache.action. However, if you don't want
> client-side caching, you might as well just use @cache.ram.
>
> Anthony
>
> On Sunday, February 28, 2016 at 3:39:08 PM UTC-5, Krzysztof Socha wrote:
>>
>> I have a page that is sometimes (not very often) upd
I have a page that is sometimes (not very often) updated. The default view
is quite complex, so caching it in RAM significantly improves performance.
However, if I try to cache it in RAM using something like:
@cache.action(time_expire=3600, cache_model=cache.ram, prefix='index')
the browser
On Wednesday, January 6, 2016 at 1:58:19 PM UTC+1, Anthony wrote:
>
>
> Well, any time you upgrade the framework, you should always upgrade
> web2py.js (no need to check whether it has changed -- just do it).
>
>
I guess, this is more-less what I need to do, but this is not perfect, as I
have
On Wednesday, January 6, 2016 at 5:30:25 PM UTC+1, Anthony wrote:
>
>
>> I guess, this is more-less what I need to do, but this is not perfect, as
>> I have several applications that I maintain and updating all of them
>> manually is not great. Also - is this the only file that should be
I have been playing with git repo for web2py, and I find it very useful.
Especially the tags - you can easily move from the current master (trunk)
to a specific stable release... or so it seems.
I noticed that the tag do not seem to match the version numbers reported in
the admin panel for
roduce.
>
> On Thursday, December 31, 2015 at 5:23:38 PM UTC-5, Krzysztof Socha wrote:
>>
>> As I wrote:
>>
>> 2.13.4-stable+timestamp.2015.12.26.04.59.39
>> (Running on nginx/1.4.6, Python 2.7.6)
>>
>> Strange... I will have to investigate a bit more, than
I noticed a similar thing... I need two grids on a page. As documented, it
does not work very well to simply put them in one controller function.
Hence, I tried with LOADing a component. This generally works, but I cannot
get the selectable actions to work. I have defined custom selectable
u know
> exhibits the problem?
>
> Anthony
>
> On Thursday, December 31, 2015 at 12:53:53 PM UTC-5, Krzysztof Socha wrote:
>>
>> I noticed a similar thing... I need two grids on a page. As documented,
>> it does not work very well to simply put them in one controller fu
exact code and it works for me. Which version of web2py?
> Maybe attach a minimal app that demonstrates the problem.
>
> Anthony
>
> On Thursday, December 31, 2015 at 3:39:37 PM UTC-5, Krzysztof Socha wrote:
>>
>> Anthony,
>>
>> Thank you for (very) quic
I tried to use the templating system of web2py for parsing dynamically
generated views. Theoretically, it should work - render from gluon.template
accepts streams and strings as well. However, it seems that due to the fact
it uses cStringIO instead of StringIO, it is unable to process unicode
It appears that I have been missing somthing. It is sufficient to properly
encode the string before passing it to render:
render(template_content.encode('utf-8'))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
es' : expires,
UnboundLocalError: local variable 'expires' referenced before assignment
Regards,
Krzysztof.
On Saturday, October 17, 2015 at 4:39:44 AM UTC+2, Massimo Di Pierro wrote:
>
> This may be fixed in trunk. Can you please check it.
>
> On Wednesday, 14 October 2015 13:03:01 UTC
015 at 5:56:20 PM UTC+2, Krzysztof Socha wrote:
>
> I cloned repo from github, and now I get:
>
> type 'exceptions.UnboundLocalError'> local variable 'expires' referenced
> before assignment
>
> I guess something was fixed, but something else got broken? More details:
>
>
> Note, if you use form.custom.widget.fieldname in a custom form, you still
> get errors displayed automatically (the error is part of the widget
> object). The example linked above shows the hiderror option being used. In
> that case, you are explicitly suppressing the automatic error
Hi,
I am trying to configure caching on my site, but it does not seem to work.
As soon as I use the cache.action decorator, such as:
@cache.action(time_expire=0,cache_model=cache.ram)
for any action in the controller, I get an exception thrown with:
*'session_' local variable referenced
On Wednesday, December 11, 2013 at 10:01:39 PM UTC+1, Mark Li wrote:
I looked into the code and my web2py.js was not the same as the github
link, which I noticed because my forminputclickselector did not contain
:not([name])
. When I diff-ed the original link for the newest web2py.js,
I am fighting it for some time now... I tried all the different ways to
migrate the database so that the tables for the scheduler are created, but
no luck - maybe someone could help...
I have an existing application. Recently I decided I needed to run some
things in the background, so I added
or wasn't (1,5 years ago) to work in production. I was required to
compile Nginx to include phusion module because it is not include by
default, to me just that is enough to not consider it prod ready...
Richard
On Tue, Apr 15, 2014 at 3:34 AM, Krzysztof Socha ksz...@gmail.comwrote:
Thanks
Thanks... But I kinda cannot... The hosting I am using is providing nginx +
phusion passenger... and it works with a simple script, as I have shown.
Unfortunately, it looks like the web2py handler never returns anything and
the request time-outs... I do not even know where to look to understand
I am trying to setup (vanila) web2py on shared hosting with nginx and
passenger with support for python. I put all the files from web2py folder
in the folder expected by passenger, I created a file passenger_wsgi.py
required by passenger, which I simlinked to wsgihandler.py (taken from the
On Thursday, March 27, 2014 5:21:34 PM UTC+1, Niphlod wrote:
did you try with a fresh database ?
After some investigation, it seems that the problem is not related to what
I wrote above (!)
I tried to change the DB - to MySQL - and the error reported changed to
something like 'attribute
Just an update. It appears to be an issue with SQLITE. The actual problem
was related to the fact that I have redefined AUTH_USER table (by company
table - not all of it quated in my post). I had a missing field used in the
default NavBar - first_name. When I switched from SQLITE to MYSQL, the
I created a simple table that uses another table as a list of possible
values for a field:
db.define_table('country',
Field('name','string',length=DEFAULT_STRING_LENGTH))
db.define_table('company',
Field('name', 'string',
requires=IS_NOT_EMPTY(error_message=auth.messages.is_empty)),
27 matches
Mail list logo