[web2py] Update value on view

2017-09-07 Thread Wabbajack
Hi All, I am really confused on auto updating variable on view... What i want is i have an initial value that is displayed on index.html thru query in default.py index function But hope to change this values everytime there is a change on the database. I have read this https://groups.google.co

[web2py] Re: How to save the last login datetime

2017-09-07 Thread Sandro Costa
Thank you very much Anthony. On Tuesday, September 5, 2017 at 6:38:05 PM UTC+1, Anthony wrote: > > All logins (and other Auth events) are stored in the db.auth_events table. > But if you want to store just the most recent login in the db.auth_user > table itself, you can do so using a callback,

Re: [web2py] Re: dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Chinh Dang
Can we purge only a subset of sessions? On Sep 7, 2017 5:17 PM, "Anthony" wrote: > On Thursday, September 7, 2017 at 1:18:10 PM UTC-4, Alex Glaros wrote: >> >> is it theoretically possible to leverage redis as a sessions store so >> that web2py session can hold many of the things normally kept o

[web2py] Re: dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Anthony
On Thursday, September 7, 2017 at 1:18:10 PM UTC-4, Alex Glaros wrote: > > is it theoretically possible to leverage redis as a sessions store so that > web2py session can hold many of the things normally kept on the db? > > For example, could you store things like email-contacts and high-use > lo

[web2py] Re: SQLFORM.grid selectable with multiple buttons behaves strange

2017-09-07 Thread A3
After researching the forum and other locations I found the following "solution": the raise HTTP(200) seems to break the running submit code. As suggested elsewhere the download should be invoked on another page. So first redirect and than start the download. I replaced: selectable = [('Dow

[web2py] Re: dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Alex Glaros
sounds great! -- 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" gr

[web2py] Re: dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Leonel Câmara
It's not just theoretically possible web2py supports it: http://www.web2py.com/books/default/chapter/29/13/deployment-recipes?search=redis#Sessions-in-Redis It can improve performance significantly. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/

Re: [web2py] Re: Best practice regarding applications

2017-09-07 Thread Chinh Dang
You may also want to consider the availability of your applications. By having all your apps on a single server and if the server is down, all your apps will also be impacted. Unless, you have high availability built in at the server level, i.e. cluster. On Sep 7, 2017 7:00 AM, "Najtsirk" wrote:

[web2py] dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Alex Glaros
is it theoretically possible to leverage redis as a sessions store so that web2py session can hold many of the things normally kept on the db? For example, could you store things like email-contacts and high-use lookup tables usually accessed as tables on the db, but now in session vars in orde

Re: [web2py] Re: logging

2017-09-07 Thread Richard Vézina
Hello Lars, Did you read that : https://github.com/web2py/web2py/blob/0d646fa5e7c731cb5c392adf6a885351e77e4903/examples/logging.example.conf I am looking at logging rigth now a new module and I do my research... Setting global logger might be one of the main reason of your issue as I guess you a

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread Anthony
On Thursday, September 7, 2017 at 3:34:08 AM UTC-4, pbreit wrote: > > Are you trying to store the URL of the page the user is currently on? > > I think you just want to store the URL. There's not just one variable as > far as I could tell. So you might have to build it like: > > bookmark = "%s://%

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread Alex Glaros
It worked! Thanks Pbreit on my desktop, it skiped the port part of the address 8000 so had to add to use w2p URL format: bookmark = request.get_vars.bookmark.rsplit('/', 1)[-1] -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread Anthony
> > VIEW THAT CAPTURES CURRENT PAGE VARS > > {{import json}} <-- side question: Why "import json" only works in > view and not controller? > Not sure what you mean. The json module is part of the standard library and can be imported from anywhere. > {{=A('Add this page or manage book

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread Anthony
Can you show your code, a screenshot, and explain exactly what you are trying to achieve. If I do SQLFORM.grid(..., csv=False), I see no export links. Anthony On Thursday, September 7, 2017 at 7:42:38 AM UTC-4, Andrea Fae' wrote: > > Yes > > Il 07 set 2017 1:41 PM, "黄祥" ha scritto: > >> had yo

[web2py] left join and common_filter

2017-09-07 Thread Marvi Benedet
Hello, I'm writing a multi-tenant app. All tables have a domain field which is used to distinguish beetween different organizations. They all have a "common_filter = lambda query: db..domain==session.domain" parameter. All is working fine, except when I'm trying to use a left join query, in this

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread andfae
Yes Il 07 set 2017 1:41 PM, "黄祥" ha scritto: > had you tried : > csv = False > > 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

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread 黄祥
had you tried : csv = False 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 message because you are subscribed to

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread andfae
No...I just tested both Il 07 set 2017 1:06 PM, "Martin Weissenboeck" ha scritto: > I think grid(exportklasses=None) or grid( > exportclasses=dict(xml=false, csv=False,, html=False, tsv=False) should do > the job. I have not tried it. > > From the book: > > > >- exportclasses takes a

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread Martin Weissenboeck
I think grid(exportklasses=None) or grid( exportclasses=dict(xml=false, csv=False,, html=False, tsv=False) should do the job. I have not tried it. >From the book: - exportclasses takes a dictionary of tuples: by default it's defined as 1 2 3 4 5 6 csv_with_hidden_cols=(ExporterCSV,

[web2py] Re: Best practice regarding applications

2017-09-07 Thread Najtsirk
Thanks! On Saturday, 2 September 2017 06:16:17 UTC+2, Massimo Di Pierro wrote: > > It is fine to have one web2py and as many domains as you need. It should > not affect performance provided you take advantage of the cores you have. > That means you want to make sure you use nginx+uwsgi or gevent

[web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread Andrea Fae'
I don't want any export and I dont' want the text "export" in the bottom of the grid... -- 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

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2017-09-07 Thread Andrea Fae'
I need the same! Il giorno venerdì 5 maggio 2017 09:30:56 UTC+2, Yebach ha scritto: > > How can you also remove the text "Export" ?? > > If I set all classes to False the text stays, if I remove export classes > from signature it displays all > > On Wednesday, August 15, 2012 at 12:41:28 PM UTC+

[web2py] Re: web2py 2.15.4 is OUT

2017-09-07 Thread pbreit
To update can i just do a `git pull` or do I need to do something like `git pull --recurse-submodules` -- 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) --- Yo

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread pbreit
Are you trying to store the URL of the page the user is currently on? I think you just want to store the URL. There's not just one variable as far as I could tell. So you might have to build it like: bookmark = "%s://%s%s" % (request.env.wsgi_url_scheme, request.env. remote_addr, request.env.req