[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Anthony


> The section of the online book about this says the lambda in the 
>> selectable should be a redirect; when it was, I still got 2 requests, but 
>> the second had an added var w/ the selected IDs.
>>
>
> The book doesn't say the callback should do a redirect -- that's just an 
> example. In any case, if your callback doesn't do a redirect, then the grid 
> code itself will do a redirect back to the original URL. This is by design 
> (maybe so reloading the page or leaving and returning don't trigger a 
> browser warning and subsequent re-posting of the selected rows).
>

Also, in case the selectable callback modifies or deletes any records, 
reloading the grid ensures it will be displaying up-to-date data.

Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Login page - Menu bar does not work

2016-09-21 Thread SR
When I am in the Login page, the menu items does not work.
Any idea why it is not working?
Thanks.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Assign users to multiple groups

2016-09-21 Thread SR
Thanks a lot.

On Wednesday, September 21, 2016 at 5:40:39 PM UTC-5, SR wrote:
>
> How can I assign a particular user to 3 different groups?
> Any suggestions?
> Thanks.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Assign users to multiple groups

2016-09-21 Thread SR
How I do it using the web2py's "Administrative Interface"?


On Wednesday, September 21, 2016 at 5:40:39 PM UTC-5, SR wrote:
>
> How can I assign a particular user to 3 different groups?
> Any suggestions?
> Thanks.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Assign users to multiple groups

2016-09-21 Thread Dave S


On Wednesday, September 21, 2016 at 3:40:39 PM UTC-7, SR wrote:
>
> How can I assign a particular user to 3 different groups?
> Any suggestions?
> Thanks.
>

Wouldn't that be just applying the add_membership() call 3 times? 
  auth.add_membership(brits, james_bond)
  auth.add_membership(shakers, james_bond)
  auth.add_membership(agents, james_bond)



/dps

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Assign users to multiple groups

2016-09-21 Thread SR
How can I assign a particular user to 3 different groups?
Any suggestions?
Thanks.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-21 Thread Niphlod
BTW: it has been merged . You can safely take scheduler.py from master and 
overwrite your own if you want to avid specifying next_run_time

On Wednesday, September 21, 2016 at 5:57:44 PM UTC+2, Bernardo Leon wrote:
>
> Niphlod I will use postgresql in production and your solution as well. 
> Thank you for helping me! ;)
>
> El miércoles, 21 de septiembre de 2016, 2:33:30 (UTC-5), Niphlod escribió:
>>
>> that error is due - mostly - when the backend is too much pressured (i.e. 
>> you're using sqlite, or too many workers, or a too low heatbeat)
>>
>> this is the fix  https://github.com/web2py/web2py/pull/1453 . you can 
>> subscribe to it to know when it'll be merged.
>>
>> On Tuesday, September 20, 2016 at 5:38:08 PM UTC+2, Bernardo Leon wrote:
>>>
>>> Thank you for your reply. Can you reply this thread when the fix is 
>>> published?
>>>
>>> I don't know if this is related to the same bug but in my worker process 
>>> terminal I have this message:
>>>
>>> ERROR:web2py.scheduler.cedia-Satellite-L55-C#18606:error popping 
>>> tasks
>>>
>>> why do I have this error? Thanks.
>>>
>>> El lunes, 19 de septiembre de 2016, 13:37:05 (UTC-5), Niphlod escribió:

 sorry, a bug slipped in. In the wait for the fix, please use 
 next_run_time in addition to start_time.

 On Monday, September 19, 2016 at 6:27:28 PM UTC+2, Bernardo Leon wrote:
>
> Hi, I am trying to run tasks in the future based on a time the user 
> specifies but as soon as the task is queued it is executed, what am I 
> doing 
> wrong?
>
> I am using web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
>
> This is my model.db (part of it)
>
> db = DAL('sqlite://recomendadorexpertos.db')
>
> db.define_table('topicos',
>Field('curso', 'reference cursos'),
>Field('nombre', 'string', required=True, length=512),
>Field('palabras_clave', 'text', readable=False, 
> required=True, length=2048),
>Field('fecha_inicio_identificacion', 'date', 
> required=True, comment=T('Indica la fecha desde la cual se empezará a 
> buscar expertos.')),
>Field('fecha_fin_identificacion', 'date', 
> required=True, comment=T('Indica la fehca en la cual se publicarán las 
> recomendaciónes de expertos.')),
>Field('fecha_fin_publicacion', 'date', 
> comment=T('Indica la fecha hasta cuando se publicaran las recomendaciones 
> de expertos (opcional)')),
>Field('timestamp_get_tweets_etiquetado', 'datetime', 
> readable=False, writable=False), #Para mostrar al usuario desde cuando se 
> estan descargando tweets para etiquetado.
>Field('link_descarga_tweets_etiquetado', 'string', 
> readable=False, writable=False, length=2048),
>Field('upload_archivo_etiquetado', 'upload', 
> length=524288, 
> uploadfolder='/var/www/web2py/applications/RecomendadorExpertos/archivos_etiquetados/',
>  
> autodelete=True, comment=T('Primero inicie el proceso de descarga de 
> tweets 
> para este topico, descargue el archivo para etiquetado, etiquetelo y 
> subalo 
> aqui.'), label=T('Subir archivo etiquetado'), readable=False), #Cambiar 
> el 
> nombre del archivo que suba a [nombre_topico].csv
>Field('path_modelo', 'string', readable=False, 
> writable=False, length=2048), #Ruta del modelo entrenado
>Field('topico_configurado_completamente', 'integer', 
> readable=True, writable=False, default=1, 
> represent=representTopicoConfigurado), #Sirve para mostrar un check alado 
> del archivo subido una vez terminado de generarse el modelo, para que el 
> profesor sepa que ya esta todo bien.
>Field('id_scheduler_task_descarga_tweets', 'integer', 
> readable=False, writable=False),
>Field('id_scheduler_task_identificacion_expertos', 
> 'integer', readable=False, writable=False),
>Field('id_scheduler_task_publicacion_expertos', 
> 'integer', readable=False, writable=False))
>
>
> This is my Scheduler.py
>
> def task_iniciar_descarga_tweets(row):
> return 'descarga de tweets terminada'
>
> def task_iniciar_identificacion_expertos(nombre_topico):
> return 'identificacion de expertos terminada'
>
> def task_publicar_expertos(nombre_topico):
> return 'publicacion de expertos terminada'
>
> dbScheduler = DAL('sqlite://scheduler.db')
> scheduler = Scheduler(dbScheduler, 
> tasks={'task_iniciar_descarga_tweets':task_iniciar_descarga_tweets,
>   
> 'task_iniciar_identificacion_expertos':task_iniciar_identificacion_expertos,
>   
> 'task_publicar_expertos':task_publicar_expertos})
>

[web2py] Re: Off topic (1) what data warehouse with w2p data and (2) survey: which ones are you using?

2016-09-21 Thread Niphlod
postgresql is fairly supported. on top of the usual suspects, qlikview and 
tableau are really great, if you can spend some money.

On Wednesday, September 21, 2016 at 7:21:37 PM UTC+2, Alex Glaros wrote:
>
> Using Postgres to store web2py transactional data. Any advice regarding 
> data warehouse choice in terms of ease of data transfer, compatibility, 
> etc.  
>
> If their roles are  so separate that compatibility is not relevant, am 
> still curious regarding:
>
>- What people are using and would like to hear about working examples. 
>- What method are you using to migrate data to the DW: Migration 
>script, Talend, etc.?
>
> The use case is government DW for business data analytics and 
> client-controlled/created reports.
>
> thanks
>
> Alex Glaros
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: scaling web2py

2016-09-21 Thread Niphlod
I saw a relatively/mostly related issue on the repo and so I feel I should 
give an answer...

web2py is a web framework: we're not in the business of managing processes 
nor webservers. We're in the business of realizing an app that does what 
you want in response to a web request.
For development purposes (and relatively small deployments) web2py includes 
a single process threaded webserver, that is rocket.

NOBODY says that you MUST run web2py under rocket. For all matter and 
purposes, in production we (or, for better saying, people who manage 
production-grade environments) highly encourage uwsgi + nginx on unix and 
fastcgi+iis on windows.

web2py is compatible with the wsgi standards which ATM is the only largely 
accepted way to run python web-serving apps. Usually frontends are I/O 
bound and not CPU bound: threading is the best choice there, so the rocket 
threaded webserver is just a matter of providing a "sane default".

web2py's scheduler is just something you can offload CPU (or long-running) 
tasks to an external process. Webservers DO enforce a timeout on each and 
every request (again, it's  a matter of "sane defaults" on their end) and 
so the "pattern" of having a facility that offloads those kind of things to 
"something else" has gained traction.

web2py (and the scheduler) just adhere to "standards" and "sane defaults". 
I wouldn't be startled by the statement "should my web-serving process 
consume 1/10th of the CPU resources given to external processes" because 
the role of the web-serving process is reacting to user inputs. If the 
reaction is a web-page, usually the time taken to generate the page is far 
less than the time it takes to transfer it (or, for better saying, the time 
web2py spends in rendering the page is far less than the time taken to 
retrieve results from the db and shipping that result to the user's 
browser). If the reaction of a user input is to calculate the prime numbers 
from 10^56 to 10^101 ... well, you need to ship that work elsewhere because 
running it inside a web-serving app would only mean forcing the user 
waiting for a reply way too much.

Back to the "how should web2py be handled". you can choose whatever you 
like, according to your own app's needs and number of users (or, again for 
better saying, number of requests to serve per second): USUALLY you'd want 
something like uwsgi+nginx or iis+fastcgi to do the heavy work of spawning 
web2py processes as needed and having those serve the needs of the users 
requesting pages. They do an excellent job and provide nice facilities 
(like buffering) to make everything as speedier as possible.
Long running tasks can OPTIONALLY be handled by an external process (like 
the scheduler) to avoid hitting the "sane limits" defaults imposed by the 
majority of webservers (like that a request should be handled in AT MOST 60 
seconds, which, if you reeeally think it through, is a RALLY long time 
to wait for whatever webpage the user asks for).

 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Anthony
On Wednesday, September 21, 2016 at 1:16:29 PM UTC-4, Scott Hunter wrote:
>
> I think I understand; seems like something that should be documented, as 
> well as able to be disabled.
>

Is it causing a problem for you? Why do you need to disable the redirect?

Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Passing a list as query parameter and storing the retrieved rows in a list

2016-09-21 Thread Anthony
On Wednesday, September 21, 2016 at 3:30:49 AM UTC-4, Meinolf wrote:
>
> OMG, Is this normal?
> i got chills telling me it had something to do with the *For Loop*, 
> played around with the LBs and UBs and the following worked:
>
>* for i in range(-1, (len(getcourseids)-1)):*
>

First, if you want the subscripts of a list, just do range(len(thelist)). 
Do not subtract 1 from the length of the list -- range already handles that 
for you (it returns integers that are strictly less than the second 
argument). Also, no need to start with 0, as that is the default. And don't 
start with -1 -- when used as a subscript, that will simply retrieve the 
*last* item in the list, not the first. Also, in Python 2, use xrange() in 
for loops, which is more memory efficient (in Python 3, range has been 
replaced by xrange).
 

>* c = db.item.id ==getcourseids[i].item_id*
> *s.append(db(c).select(db.item.course_title)[i])*
>

Here it is not clear why you are subscripting the result of the select with 
[i]. Presumably each query returns a single matching row, which means you 
want the subscript to always be [0] -- otherwise, you will get a list index 
out of range error.

Anyway, you should not be using the above method at all, as it is very 
inefficient (you are doing a separate database query for every single item 
in getcourseids, when you could instead use a single query). Villas has the 
right idea, but getcourseids.values() assumes getcourseids is a dictionary 
-- presumably it is actually a Rows object. So, you can do:

s = db(db.item.id.belongs([c.item_id for c in 
getcourseids])).select(db.item.course_title)

Note, the above is a Rows object. You can convert it to a list if you 
really need a list, but most likely you can work with the Rows object (it 
can be iterated and indexed just like a list).

Assuming getcourseids is a Rows object and the only reason it was created 
was to get the item_id values to be used in this subsequent query, you can 
instead skip the creation of getcourseids and just use a nested select 

:

id_query = db([your query to retrieve course 
ids])._select(db.your_course_table.item_id)
s = db(db.item.id.belongs(id_query)).select(db.item.course_title)


Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: scaling web2py

2016-09-21 Thread Dave S


On Wednesday, September 21, 2016 at 6:37:21 AM UTC-7, Pierre wrote:
>
> Hi,
>
> I am very familiar with the concepts of threads, processes and scaling 
> issues. What i understand so far is:
> (1) a web2py application process manages a number of threads dealing with 
> requests
> (2) I can run one or more additional scheduler processes to unload the 
> main process (#1)
>
> doing (2) I may end up with more computing power allocated to  schedulers 
> than to the w2p application ?
>
> (3) I read that an Oracle server can run in multi-process mode but every 
> process is independant ?
> what for to run the same app in multi-process mode if processes can't 
> coordinate themselves ?
> is this only good in the case of independant applications running on the 
> same server ?
>
> Can a web2py app run in multi-process mode and stay synchronized ? if not 
> how to scale it besides adding more threads to the main process?
>

The normal scaling (AIUI) is done with nginx or apache, and having worker 
threads dispatched to run each request separately.  Web2py is designed to 
work in that environment.  Each request accessing the database will take a 
connection from the connection pool.  Scheduled tasks run in other threads 
(that get launched at startup (manually or startup scripts).  Requests 
don't usually monitor scheduled tasks, but a page can use refresh interval 
or jquery to watch for when a task has finished.

What synchronization issues do imagine will occur?

What workflow are you trying to handle?

/dps




-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Passing a list as query parameter and storing the retrieved rows in a list

2016-09-21 Thread Dave S
On Wednesday, September 21, 2016 at 12:30:49 AM UTC-7, Meinolf wrote:
>
> OMG, Is this normal?
> i got chills telling me it had something to do with the *For Loop*, 
> played around with the LBs and UBs and the following worked:
>
>* for i in range(-1, (len(getcourseids)-1)):*
>* c = db.item.id ==getcourseids[i].item_id*
> *s.append(db(c).select(db.item.course_title)[i])*
>
> Now i'm puzzled as to why give a lower bound of -1 for the range, will 
> this keep on working or my code could later crash I put it under a 
> *Try..Except 
> * block though..please help if there's a safer alternative, this is new 
> to me and sort of contradicts what i know of starting from 0.
>
>
The normal Python way of writing a loop on a list is:
 for id in getcourseid:
   c = db.item.id == id.item_id
   s.append(db(c).select(db.item.course_title)) 
Giving an explicit range would be appropriate if you were processing only a 
portion of the list, but there you could use Python slices to do that:
 for id in getcourseid[3:7]:
   etc

As for your effort to use villas' suggestion, you should have replace his "
values" with your "item_id".

You might want to scan Chapter 3 for some examples of Python coding and 
web2py queries.

and just below that, the wiki example, especially def show: and the 
pagecomments query.

/dps
 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: retrieval of data from android device and adding it to database through gprs connection

2016-09-21 Thread Dave S


On Tuesday, September 20, 2016 at 10:29:51 PM UTC-7, karthik naidu wrote:
>
>
> hi, i'm new to web2py.
> I'm making an app to track positions of an android device.
> how to recieve data from android device and store it in my database.
> thanks in advance.
>

Short answer:  the android device should do a POST with the pertinent data, 
and you write a web2py controller that does a db.mytable.insert().

 http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#insert>

If the data can be updated, scroll down a bit in the book to read about 
update_record() and update_or_insert().

If you're having the android user access a web page to enter data, then you 
probably want to look at SQLFORM()
. 
(scroll down to where you see "def show():")


If you are writing a native app, then you'd make the native call to POST 
the data.
(You can simulate this from a desktop using curl.exe from 

)

/dps

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Off topic (1) what data warehouse with w2p data and (2) survey: which ones are you using?

2016-09-21 Thread Alex Glaros
Using Postgres to store web2py transactional data. Any advice regarding 
data warehouse choice in terms of ease of data transfer, compatibility, 
etc.  

If their roles are  so separate that compatibility is not relevant, am 
still curious regarding:

   - What people are using and would like to hear about working examples. 
   - What method are you using to migrate data to the DW: Migration script, 
   Talend, etc.?

The use case is government DW for business data analytics and 
client-controlled/created reports.

thanks

Alex Glaros

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
I think I understand; seems like something that should be documented, as 
well as able to be disabled.


On Wednesday, September 21, 2016 at 12:37:52 PM UTC-4, Anthony wrote:
>
> On Wednesday, September 21, 2016 at 9:36:14 AM UTC-4, Scott Hunter wrote:
>>
>> Here's a simple controller using an SQLFORM.grid w/ selectable:
>>
>> def open_requests():
>> print 'Req: %r' % request.vars
>> query = ...
>> form = SQLFORM.grid(query, csv=False, details=False, deletable=
>> False, editable=False, searchable=False, create=False,
>> selectable = lambda ids : None)
>> return locals()
>>
>> This, as expected, puts a checkbox on each row.  If I select two rows and 
>> hit Submit, I get the following printed from the server:
>>
>> Req: > '0720df2b-6449-43c8-a6b7-6c89dfdebcd3', '_signature': 
>> 'cbc73b5fbdc8e5961830efbe3f672f35a41d6771', '_formname': 'web2py_grid'}>
>> Req: 
>>
>> The section of the online book about this says the lambda in the 
>> selectable should be a redirect; when it was, I still got 2 requests, but 
>> the second had an added var w/ the selected IDs.
>>
>
> The book doesn't say the callback should do a redirect -- that's just an 
> example. In any case, if your callback doesn't do a redirect, then the grid 
> code itself will do a redirect back to the original URL. This is by design 
> (maybe so reloading the page or leaving and returning don't trigger a 
> browser warning and subsequent re-posting of the selected rows).
>
> Anthony
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Anthony
On Wednesday, September 21, 2016 at 9:36:14 AM UTC-4, Scott Hunter wrote:
>
> Here's a simple controller using an SQLFORM.grid w/ selectable:
>
> def open_requests():
> print 'Req: %r' % request.vars
> query = ...
> form = SQLFORM.grid(query, csv=False, details=False, deletable=
> False, editable=False, searchable=False, create=False,
> selectable = lambda ids : None)
> return locals()
>
> This, as expected, puts a checkbox on each row.  If I select two rows and 
> hit Submit, I get the following printed from the server:
>
> Req:  '0720df2b-6449-43c8-a6b7-6c89dfdebcd3', '_signature': 
> 'cbc73b5fbdc8e5961830efbe3f672f35a41d6771', '_formname': 'web2py_grid'}>
> Req: 
>
> The section of the online book about this says the lambda in the 
> selectable should be a redirect; when it was, I still got 2 requests, but 
> the second had an added var w/ the selected IDs.
>

The book doesn't say the callback should do a redirect -- that's just an 
example. In any case, if your callback doesn't do a redirect, then the grid 
code itself will do a redirect back to the original URL. This is by design 
(maybe so reloading the page or leaving and returning don't trigger a 
browser warning and subsequent re-posting of the selected rows).

Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-21 Thread Bernardo Leon
Niphlod I will use postgresql in production and your solution as well. 
Thank you for helping me! ;)

El miércoles, 21 de septiembre de 2016, 2:33:30 (UTC-5), Niphlod escribió:
>
> that error is due - mostly - when the backend is too much pressured (i.e. 
> you're using sqlite, or too many workers, or a too low heatbeat)
>
> this is the fix  https://github.com/web2py/web2py/pull/1453 . you can 
> subscribe to it to know when it'll be merged.
>
> On Tuesday, September 20, 2016 at 5:38:08 PM UTC+2, Bernardo Leon wrote:
>>
>> Thank you for your reply. Can you reply this thread when the fix is 
>> published?
>>
>> I don't know if this is related to the same bug but in my worker process 
>> terminal I have this message:
>>
>> ERROR:web2py.scheduler.cedia-Satellite-L55-C#18606:error popping tasks
>>
>> why do I have this error? Thanks.
>>
>> El lunes, 19 de septiembre de 2016, 13:37:05 (UTC-5), Niphlod escribió:
>>>
>>> sorry, a bug slipped in. In the wait for the fix, please use 
>>> next_run_time in addition to start_time.
>>>
>>> On Monday, September 19, 2016 at 6:27:28 PM UTC+2, Bernardo Leon wrote:

 Hi, I am trying to run tasks in the future based on a time the user 
 specifies but as soon as the task is queued it is executed, what am I 
 doing 
 wrong?

 I am using web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47

 This is my model.db (part of it)

 db = DAL('sqlite://recomendadorexpertos.db')

 db.define_table('topicos',
Field('curso', 'reference cursos'),
Field('nombre', 'string', required=True, length=512),
Field('palabras_clave', 'text', readable=False, 
 required=True, length=2048),
Field('fecha_inicio_identificacion', 'date', 
 required=True, comment=T('Indica la fecha desde la cual se empezará a 
 buscar expertos.')),
Field('fecha_fin_identificacion', 'date', required=True, 
 comment=T('Indica la fehca en la cual se publicarán las recomendaciónes de 
 expertos.')),
Field('fecha_fin_publicacion', 'date', comment=T('Indica 
 la fecha hasta cuando se publicaran las recomendaciones de expertos 
 (opcional)')),
Field('timestamp_get_tweets_etiquetado', 'datetime', 
 readable=False, writable=False), #Para mostrar al usuario desde cuando se 
 estan descargando tweets para etiquetado.
Field('link_descarga_tweets_etiquetado', 'string', 
 readable=False, writable=False, length=2048),
Field('upload_archivo_etiquetado', 'upload', 
 length=524288, 
 uploadfolder='/var/www/web2py/applications/RecomendadorExpertos/archivos_etiquetados/',
  
 autodelete=True, comment=T('Primero inicie el proceso de descarga de 
 tweets 
 para este topico, descargue el archivo para etiquetado, etiquetelo y 
 subalo 
 aqui.'), label=T('Subir archivo etiquetado'), readable=False), #Cambiar el 
 nombre del archivo que suba a [nombre_topico].csv
Field('path_modelo', 'string', readable=False, 
 writable=False, length=2048), #Ruta del modelo entrenado
Field('topico_configurado_completamente', 'integer', 
 readable=True, writable=False, default=1, 
 represent=representTopicoConfigurado), #Sirve para mostrar un check alado 
 del archivo subido una vez terminado de generarse el modelo, para que el 
 profesor sepa que ya esta todo bien.
Field('id_scheduler_task_descarga_tweets', 'integer', 
 readable=False, writable=False),
Field('id_scheduler_task_identificacion_expertos', 
 'integer', readable=False, writable=False),
Field('id_scheduler_task_publicacion_expertos', 
 'integer', readable=False, writable=False))


 This is my Scheduler.py

 def task_iniciar_descarga_tweets(row):
 return 'descarga de tweets terminada'

 def task_iniciar_identificacion_expertos(nombre_topico):
 return 'identificacion de expertos terminada'

 def task_publicar_expertos(nombre_topico):
 return 'publicacion de expertos terminada'

 dbScheduler = DAL('sqlite://scheduler.db')
 scheduler = Scheduler(dbScheduler, 
 tasks={'task_iniciar_descarga_tweets':task_iniciar_descarga_tweets,
   
 'task_iniciar_identificacion_expertos':task_iniciar_identificacion_expertos,
   
 'task_publicar_expertos':task_publicar_expertos})


 And this is my default.py controller (part of it)

 @auth.requires_login()
 def onCreateTopico(form):
 row_task_iniciar_identificacion = 
 scheduler.queue_task('task_iniciar_identificacion_expertos', 
 pvars={'nombre_topico':form.vars.nombre}, 
 

[web2py] anonymize sensitive data on the fly using LazyCrypt() object as primary key

2016-09-21 Thread Zoltan Vincze
I would like to anonymize some DB-tables on the fly to ensure that no one - 
not even me as administrator - can perform joins between tables signed with 
auth.user_id and tables signed with anonym_user_id but the logged in user 
himself. At the same time I would like to be able to perform joins within 
the tables signed with anonym_user_id like this:

select a.*, b.*
from table1 a, table2 b
where a.anonym_user_id = b.anonym_user_id

even if the user is not logged in. This means the system has to assign on 
login the same anonym.user_id to the user, otherwise I couldn't perform 
joins using it as a key.

My idea is to extend the auth_user table with two fields (user_salt, 
user_prefix) generated on registration and filled with a UUID. On login the 
user would get assigned a hash like this:

session.anonym_user_id = 
str(CRYPT(digest_alg='pbkdf2(1000,20,sha512)',key='my_secret_key',salt='user_salt')('user_prefix'+'user_password')[0])

If I understand the hashing process correctly than the following:

>>> a = 
str(CRYPT(digest_alg='pbkdf2(1000,20,sha512)',salt=True)('user_password')[0])
>>> CRYPT(digest_alg='pbkdf2(1000,20,sha512)',key='my_secret_key',salt='user_salt')('user_prefix'+'user_password')[0]
>>>  
== a
>>> False

guarantees a proper anonymization. Or do I miss something?

My question is: do I introduce any security back doors when I save the 
above anonym_user_id, user_salt, user_prefix and the 
original auth_user.password in the same DB but in different tables? Can 
someone crack the user passwords because of this?






-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
If I have the controller function return a string if there is a 
'records' variable, the second request is not made; however, then it does 
not redisplay the form.

On Wednesday, September 21, 2016 at 9:36:14 AM UTC-4, Scott Hunter wrote:
>
> Here's a simple controller using an SQLFORM.grid w/ selectable:
>
> def open_requests():
> print 'Req: %r' % request.vars
> query = ...
> form = SQLFORM.grid(query, csv=False, details=False, deletable=
> False, editable=False, searchable=False, create=False,
> selectable = lambda ids : None)
> return locals()
>
> This, as expected, puts a checkbox on each row.  If I select two rows and 
> hit Submit, I get the following printed from the server:
>
> Req:  '0720df2b-6449-43c8-a6b7-6c89dfdebcd3', '_signature': 
> 'cbc73b5fbdc8e5961830efbe3f672f35a41d6771', '_formname': 'web2py_grid'}>
> Req: 
>
> The section of the online book about this says the lambda in the 
> selectable should be a redirect; when it was, I still got 2 requests, but 
> the second had an added var w/ the selected IDs.
>
> Is this the correct behavior?  If so, what is the reasoning behind it, and 
> did I miss the explanation in the book?  
>
> I'm using version 2.14.6
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] scaling web2py

2016-09-21 Thread Pierre
Hi,

I am very familiar with the concepts of threads, processes and scaling 
issues. What i understand so far is:
(1) a web2py application process manages a number of threads dealing with 
requests
(2) I can run one or more additional scheduler processes to unload the main 
process (#1)

doing (2) I may end up with more computing power allocated to  schedulers 
than to the w2p application ?

(3) I read that an Oracle server can run in multi-process mode but every 
process is independant ?
what for to run the same app in multi-process mode if processes can't 
coordinate themselves ?
is this only good in the case of independant applications running on the 
same server ?

Can a web2py app run in multi-process mode and stay synchronized ? if not 
how to scale it besides adding more threads to the main process?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
Here's a simple controller using an SQLFORM.grid w/ selectable:

def open_requests():
print 'Req: %r' % request.vars
query = ...
form = SQLFORM.grid(query, csv=False, details=False, deletable=False
, editable=False, searchable=False, create=False,
selectable = lambda ids : None)
return locals()

This, as expected, puts a checkbox on each row.  If I select two rows and 
hit Submit, I get the following printed from the server:

Req: 
Req: 

The section of the online book about this says the lambda in the selectable 
should be a redirect; when it was, I still got 2 requests, but the second 
had an added var w/ the selected IDs.

Is this the correct behavior?  If so, what is the reasoning behind it, and 
did I miss the explanation in the book?  

I'm using version 2.14.6

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problems with websocket_messaging

2016-09-21 Thread Zoltan Vincze

>
> It seems to be a connection problem. Try to test whether tornado is 
> installed correctly together with its dependencies. I used this to get the 
> last version running on ubuntu a couple days ago:
>

Introduction to Tornado 


You can make POST or GET request to the URL directly to test tornado. If it 
works than the problem may be caused by web2py.js
 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Filter for subgraph of graph_model ?

2016-09-21 Thread Jurgis Pralgauskis
Hi, 

I came to a new job where we have ~200 tables... emm... 
graph_model would be more usefull if it could "extract/filter" some domains 
(according to search words for table/field names)
and layout nicely 10-20 tables instead of 200  (it's ok for some references 
to be "orphaned" on one end)

Maybe someone knows a quick hack  directly in  
in 
https://github.com/web2py/web2py/blob/dabe5c4589d974c6eda83e0ee16b6ec04a4a5f6a/applications/admin/controllers/appadmin.py#L569
 
?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Problems with websocket_messaging

2016-09-21 Thread Martin Weissenboeck
I have tried the websocket_messaging (gluon/contrib/websocket_messaging.py)
on a Windows 10 laptop - it works very fine!

The next step was an impementation on a Linux machine (Ubuntu 14.04.4, last
Web2py version 2.14.6)

The line

websocket_send('http://localhost:', form.vars.message, 'mykey',
'mygroup')


​works, because after entering "aa" the tornado servers send something like
​


1474441282.49:MESSAGE to mygroup:aa


to the console.

But the javascript console shows an error:

WebSocket connection to 'ws://localhost:/realtime/mygroup' failed:
Error in connection establishment:
net::ERR_CONNECTION_REFUSEDweb2py_websocket @ web2py.js:458(anonymous
function) @ index:96j @ jquery.js:2fireWith @ jquery.js:2ready @
jquery.js:2J @ jquery.js:2



​What is wrong? Any ideas?
Regards, Martin

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-21 Thread Niphlod
that error is due - mostly - when the backend is too much pressured (i.e. 
you're using sqlite, or too many workers, or a too low heatbeat)

this is the fix  https://github.com/web2py/web2py/pull/1453 . you can 
subscribe to it to know when it'll be merged.

On Tuesday, September 20, 2016 at 5:38:08 PM UTC+2, Bernardo Leon wrote:
>
> Thank you for your reply. Can you reply this thread when the fix is 
> published?
>
> I don't know if this is related to the same bug but in my worker process 
> terminal I have this message:
>
> ERROR:web2py.scheduler.cedia-Satellite-L55-C#18606:error popping tasks
>
> why do I have this error? Thanks.
>
> El lunes, 19 de septiembre de 2016, 13:37:05 (UTC-5), Niphlod escribió:
>>
>> sorry, a bug slipped in. In the wait for the fix, please use 
>> next_run_time in addition to start_time.
>>
>> On Monday, September 19, 2016 at 6:27:28 PM UTC+2, Bernardo Leon wrote:
>>>
>>> Hi, I am trying to run tasks in the future based on a time the user 
>>> specifies but as soon as the task is queued it is executed, what am I doing 
>>> wrong?
>>>
>>> I am using web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
>>>
>>> This is my model.db (part of it)
>>>
>>> db = DAL('sqlite://recomendadorexpertos.db')
>>>
>>> db.define_table('topicos',
>>>Field('curso', 'reference cursos'),
>>>Field('nombre', 'string', required=True, length=512),
>>>Field('palabras_clave', 'text', readable=False, 
>>> required=True, length=2048),
>>>Field('fecha_inicio_identificacion', 'date', 
>>> required=True, comment=T('Indica la fecha desde la cual se empezará a 
>>> buscar expertos.')),
>>>Field('fecha_fin_identificacion', 'date', required=True, 
>>> comment=T('Indica la fehca en la cual se publicarán las recomendaciónes de 
>>> expertos.')),
>>>Field('fecha_fin_publicacion', 'date', comment=T('Indica 
>>> la fecha hasta cuando se publicaran las recomendaciones de expertos 
>>> (opcional)')),
>>>Field('timestamp_get_tweets_etiquetado', 'datetime', 
>>> readable=False, writable=False), #Para mostrar al usuario desde cuando se 
>>> estan descargando tweets para etiquetado.
>>>Field('link_descarga_tweets_etiquetado', 'string', 
>>> readable=False, writable=False, length=2048),
>>>Field('upload_archivo_etiquetado', 'upload', 
>>> length=524288, 
>>> uploadfolder='/var/www/web2py/applications/RecomendadorExpertos/archivos_etiquetados/',
>>>  
>>> autodelete=True, comment=T('Primero inicie el proceso de descarga de tweets 
>>> para este topico, descargue el archivo para etiquetado, etiquetelo y subalo 
>>> aqui.'), label=T('Subir archivo etiquetado'), readable=False), #Cambiar el 
>>> nombre del archivo que suba a [nombre_topico].csv
>>>Field('path_modelo', 'string', readable=False, 
>>> writable=False, length=2048), #Ruta del modelo entrenado
>>>Field('topico_configurado_completamente', 'integer', 
>>> readable=True, writable=False, default=1, 
>>> represent=representTopicoConfigurado), #Sirve para mostrar un check alado 
>>> del archivo subido una vez terminado de generarse el modelo, para que el 
>>> profesor sepa que ya esta todo bien.
>>>Field('id_scheduler_task_descarga_tweets', 'integer', 
>>> readable=False, writable=False),
>>>Field('id_scheduler_task_identificacion_expertos', 
>>> 'integer', readable=False, writable=False),
>>>Field('id_scheduler_task_publicacion_expertos', 
>>> 'integer', readable=False, writable=False))
>>>
>>>
>>> This is my Scheduler.py
>>>
>>> def task_iniciar_descarga_tweets(row):
>>> return 'descarga de tweets terminada'
>>>
>>> def task_iniciar_identificacion_expertos(nombre_topico):
>>> return 'identificacion de expertos terminada'
>>>
>>> def task_publicar_expertos(nombre_topico):
>>> return 'publicacion de expertos terminada'
>>>
>>> dbScheduler = DAL('sqlite://scheduler.db')
>>> scheduler = Scheduler(dbScheduler, 
>>> tasks={'task_iniciar_descarga_tweets':task_iniciar_descarga_tweets,
>>>   
>>> 'task_iniciar_identificacion_expertos':task_iniciar_identificacion_expertos,
>>>   
>>> 'task_publicar_expertos':task_publicar_expertos})
>>>
>>>
>>> And this is my default.py controller (part of it)
>>>
>>> @auth.requires_login()
>>> def onCreateTopico(form):
>>> row_task_iniciar_identificacion = 
>>> scheduler.queue_task('task_iniciar_identificacion_expertos', 
>>> pvars={'nombre_topico':form.vars.nombre}, 
>>> start_time=datetime.datetime.combine(form.vars.fecha_inicio_identificacion, 
>>> datetime.time.min), 
>>> stop_time=datetime.datetime.combine(form.vars.fecha_fin_identificacion, 
>>> datetime.time.min), retry_failed=3)
>>>
>>> row_task_iniciar_publicacion = 
>>> scheduler.queue_task('task_publicar_expertos', 
>>> 

[web2py] Re: Passing a list as query parameter and storing the retrieved rows in a list

2016-09-21 Thread Meinolf
OMG, Is this normal?
i got chills telling me it had something to do with the *For Loop*, played 
around with the LBs and UBs and the following worked:

   * for i in range(-1, (len(getcourseids)-1)):*
   * c = db.item.id==getcourseids[i].item_id*
*s.append(db(c).select(db.item.course_title)[i])*

Now i'm puzzled as to why give a lower bound of -1 for the range, will this 
keep on working or my code could later crash I put it under a *Try..Except 
* block though..please help if there's a safer alternative, this is new to 
me and sort of contradicts what i know of starting from 0.

On Monday, September 19, 2016 at 7:59:27 PM UTC+2, Meinolf wrote:
>
> Hi There,
>
> When i test the code below, for a list that is supposed to have multiple 
> items, i only get one result for the last item, did i miss something in the 
> for loop or anywhere else?
>
> for i in range(0, (len(getcourseids)-1)):
> c = db.item.id==getcourseids[i].item_id
> s.append(db(c).select(db.item.course_title)[i])
>
> Any help will be appreciated.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Passing a list as query parameter and storing the retrieved rows in a list

2016-09-21 Thread Meinolf
I tried both approaches but i get the following error:
 'Rows' object has no attribute 'values'

the Rows object being referred to in the error is *getcourseids, *which is 
true because it holds a set of rows retrieved from the database before. How 
can i get around it then?

On Tuesday, September 20, 2016 at 11:18:10 PM UTC+2, villas wrote:
>
> Maybe you could better use more of the power of web2py.  Something like 
> this?
>
> s = db( db.item.id.belongs(getcourseids.values()) ).select(
>db.item.course_title).as_list()
>
> or perhaps a bit longer,  something like this...
>
> rows = db( db.item.id.belongs(getcourseids.values()) ).select(
>db.item.course_title)
>
> s = [r.course_title for r in rows]
>
> 
>
> On Monday, 19 September 2016 18:59:27 UTC+1, Meinolf wrote:
>>
>> Hi There,
>>
>> When i test the code below, for a list that is supposed to have multiple 
>> items, i only get one result for the last item, did i miss something in the 
>> for loop or anywhere else?
>>
>> for i in range(0, (len(getcourseids)-1)):
>> c = db.item.id==getcourseids[i].item_id
>> s.append(db(c).select(db.item.course_title)[i])
>>
>> Any help will be appreciated.
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.