[web2py] Apply where clause in external references

2016-02-17 Thread Alessio Varalta
Hi I have a class group and a class user for example. So i have a loop

for row_user in row_group.user.select()

now i want only the user that have status true

i try for row_user in row_group.user.select(db.user.stato==True) but i have 
a error or row_user in row_group.user.select(stato==True)

How I can make this operation? Thanks in advance

-- 
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: Apply where clause in external references

2016-02-17 Thread xmarx
users=db(db.user.stato==True).select()
for user in users:
#your code here



17 Şubat 2016 Çarşamba 10:18:40 UTC+2 tarihinde Alessio Varalta yazdı:
>
> Hi I have a class group and a class user for example. So i have a loop
>
> for row_user in row_group.user.select()
>
> now i want only the user that have status true
>
> i try for row_user in row_group.user.select(db.user.stato==True) but i 
> have a error or row_user in row_group.user.select(stato==True)
>
> How I can make this operation? Thanks in advance
>

-- 
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] regarding permission

2016-02-17 Thread prashant joshi
is there any way to provide permission to the admin to update and delete 
data from the table and provide user only to read it?

 
db = DAL("postgres://postgres:postgres@localhost:5432/tripti1")
from gluon.tools import Auth
auth = Auth(db)
auth.define_tables(username=False,signature=False)



db.define_table('stud_person',
  Field('image', 'upload'),
  Field('first_name', requires=IS_NOT_EMPTY()),
  Field('middle_name', requires=IS_NOT_EMPTY()),
  Field('last_name', requires=IS_NOT_EMPTY()),
  Field('email_id', requires=IS_NOT_EMPTY()))


till now i have done this after this what to do i'm not getting?can anyone 
help me???

-- 
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: Need opinions/reviews about embedded jquery/javascript XHTML editor

2016-02-17 Thread PRACHI VAKHARIA

 


   - Can you please post your codes for both TinyMCE and CKEditor?
   - It will allow to get a better understanding of how you applied it 
   within web2py.
   - Also, do you know how to use TinyMCE using web2py Components?
   

Thanks!

*— PRACHI*




On Saturday, 18 January 2014 02:25:02 UTC-5, weheh wrote:
>
> Update: having now hacked on CKEditor and TinyMCE, I think I'm shifted 
> over to TinyMCE. Seems a lot simpler to deal with and more organized. I 
> can't vouch for the total functionality of the package, but it seems to do 
> most of what I need. The doc and examples are clear, well organized, and 
> effective. No marketing fluff.
>
> On Saturday, January 18, 2014 1:12:17 AM UTC+8, weheh wrote:
>>
>> @Simon & Anthony:
>>
>> Thanks so much for the pointer. I had forgotten about widgets ... I've 
>> never had to design one, yet. Can that approach also be adapted to work 
>> with TinyMCE, instead?
>>
>> On the surface, TinyMCE looks easier to mod than ckeditor. Also, so far, 
>> I prefer the TinyMCE doc. The CKEditor website starts out looking promising 
>> with slick marketing. But their doc isn't as well organized or thoroughly 
>> presented as TinyMCE.
>>
>>
>>

-- 
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: Using tinymce for text areas of in component views

2016-02-17 Thread PRACHI VAKHARIA


   - Can you please post your codes for making TinyMCE work with web2py 
   Components?
   - It will allow to get a better understanding of how you applied it 
   within web2py Components.

Thanks!

*— PRACHI*


 

On Saturday, 6 November 2010 01:29:25 UTC-4, Luther Goh Lu Feng wrote:
>
> I am putting this link here 
> http://tinymce.moxiecode.com/punbb/viewtopic.php?id=28 
> as this is the solution to problematic form submissions. 
>
> tinyMCE.triggerSave() might need to be called if you are using ajax or 
> components for your form submission. Hope this will be useful to 
> someone who searches the group. 
>

-- 
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 orderby by links

2016-02-17 Thread Omicron VT
In SQLFORM.grid is possible to order the results by a links field ?

Example :

links = [{'header':'ValueX2', 'body' : lambda row : row.value*2}]
orderby = HERE IS WHERE MY QUESTION GOES
grid = SQLFORM.grid(db.mydb , links=links,orderby=orderby)

-- 
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.


Re: [web2py] Re: charts on web2py

2016-02-17 Thread Carlos Cesar Caballero Díaz
Highcharts is very good. I am using right now c3.js (http://c3js.org/) a 
good MIT licence option.


Greetings.

El 16/02/16 a las 12:54, Junior Phanter escribió:

Use highcharts
http://www.highcharts.com

Example:

*ON CONTROLLER*

def chart():

dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 
8},{name: 'Mamão', y: 12}]" #Change this dynamically


dados_map={}
dados_map["dados"]=dados_chart

chart="""

Highcharts.setOptions({
lang:{
downloadJPEG: "Download em imagem JPG",
downloadPDF: "Download em documento PDF",
downloadPNG: "Download em imagem PNG",
downloadSVG: "Download em vetor SVG",
loading: "Lendo...",
noData: "Sem dados para mostrar",
printChart: "Imprimir Gráfico",
}
});

// Build the chart
$('#chart').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Meu Gráfico'
},
tooltip: {
pointFormat: '{series.name <http://series.name>}: {point.percentage:.1f}%%'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
credits:{enabled:false},
series: [{
name: 'Vendar por porcentagem',
colorByPoint: true,
data: %(dados)s
}]
});


""" %dados_map
return dict(chart=XML(chart))

*ON VIEW*

{{extend 'layout.html'}}
type="text/javascript">
type="text/javascript">



{{=chart}}

2016-02-15 12:52 GMT-03:00 >:


I used google charts using a simple bar chart since I couldn't
find a workable example on the slice using pygal etc. But google
chart seems little slow in loading on the browser and I believe it
may be due to loading the js file from the remote site. Does
anyone have the same experience? If so, how did they resolve it. I
tried to load the js file locally but was unable to make that to
work.


On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote:

thanks!


2016-01-22 1:10 GMT-02:00 Junior Phanter :

Example using just google chart api, without
google-charts-plug-in

on controller

def chart():
title="My Chart"
data=XML('[ ["item", "value"], ["apple", 1],
["potato", 1.5], ["watermelon", 0.5]]') #convert list in
string and string in XML
return dict(title=title, data=data)

on view (chart.html)

{{extend 'layout.html'}}



https://www.gstatic.com/charts/loader.js";>


  google.charts.load('current',
{'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
  function drawChart() {

var data =
google.visualization.arrayToDataTable({{=data}});

var options = {
  title: '{{=title}}'
};

var chart = new
google.visualization.PieChart(document.getElementById('my_chart'));

chart.draw(data, options);
  }



2016-01-21 18:01 GMT-03:00 Diego Tostes :

i am trying to use google chart plugin, but the
example at

http://www.web2pyslices.com/slice/show/1721/google-charts-plugin,
it is not so clear to me.

anybody can show me a example with a controller and a
view?

i need a simple line chart.

rgds

diego

2016-01-21 17:36 GMT-02:00 Diego Tostes
:

thanks for all!


2016-01-21 14:17 GMT-02:00 Alex :

my favorite chart library:
https://www.amcharts.com/
very beautiful, easy to use, good
documentation and friendly license (allows
usage of free version even for commercial
websites).

Alex
-- 
Resources:

- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
  

Re: [web2py] Re: Using tinymce for text areas of in component views

Hello

This work for me:

Controller:
def textarea():
form=FORM('Texto:',
  TEXTAREA(_name='texto',
requires=IS_NOT_EMPTY(),_id='mytextarea'),
  INPUT(_type='submit'))
return locals()

View:


  
  tinymce.init({
selector: '#mytextarea'
  });
  
{{extend 'layout.html'}}
{{=form}}
~

On Wed, Feb 17, 2016 at 10:05 AM, PRACHI VAKHARIA 
wrote:

>
>
>- Can you please post your codes for making TinyMCE work with web2py
>Components?
>- It will allow to get a better understanding of how you applied it
>within web2py Components.
>
> Thanks!
>
> *— PRACHI*
>
>
>
>
> On Saturday, 6 November 2010 01:29:25 UTC-4, Luther Goh Lu Feng wrote:
>>
>> I am putting this link here
>> http://tinymce.moxiecode.com/punbb/viewtopic.php?id=28
>> as this is the solution to problematic form submissions.
>>
>> tinyMCE.triggerSave() might need to be called if you are using ajax or
>> components for your form submission. Hope this will be useful to
>> someone who searches the group.
>>
> --
> 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.
>

-- 
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.


Re: [web2py] Re: Progress bars and session

On 17-02-2016 00:17, Alfonso Serra wrote:
> Thanks Anthony, it does work.
> 
> The hack is easy to implement, but to represent the insertion of 30k records
> into the database, writing the session file and connecting 30k times might not
> be optimal.
> 

Perhaps you should update a field in some db table and use it instead of 
session.

Carlos Correia
=
MEMÓRIA PERSISTENTE
Tel.: 218 471 841 (NOVO)
GSM:  917 157 146
e-mail: ge...@memoriapersistente.pt
URL: http://www.memoriapersistente.pt
XMPP (Jabber): car...@memoriapersistente.pt (NOVO)
GnuPG: wwwkeys.eu.pgp.net
URL Suporte: https://t5.m16e.com/gps

-- 
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] personalizar busca

pessoal tenho uma tbl onde tem um campo date e outros campos, eu utilizo 
ela em um SQLFORM.grid. Gostaria de saber como faço pra que o 
filtro seja somente por esse campo data, e que na caixa de texto ficasse 
aparecendo somente um calendário. pra que quando eu fizer a busca ser 
somente pela data.

obrigado

-- 
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: star or favorite an event or list

I understand what you are saying. Just modify that star j-script to one and 
work out the algorithm to save the post. Yes it does. Thank you.



On Tuesday, February 16, 2016 at 10:28:06 PM UTC-5, Dave S wrote:
>
> On Tuesday, February 16, 2016 at 1:32:29 PM UTC-8, rajjm...@gmail.com 
> wrote:
>>
>> Anyway ever did a star or favorite on something that is saved by 
>> reference user to display later. Similar to craiglist or this google group 
>> even (like attached)
>>
>>
>>
> Does this post help?
> https://groups.google.com/d/msg/web2py/9AI7WLX88u0/2WpR6WhhEQAJ>
>
> /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.


Re: [web2py] Re: Displalay a form in light box or pop up window in view

If you don't want to use the nested load, you can also do this:

form = SQLFORM(db.mytable);

dialog = modal_wrapper(form, _id='*cont_id*', header='Header', 
footer='footer')

Works just fine.

On Friday, February 12, 2016 at 4:40:09 PM UTC-5, billmac...@gmail.com 
wrote:
>
> I got to tell you...this is way more fun than Django. In django all I am 
> worried using that is the framework and url redirect. Here,  the least 
> thing to worry about is framework and I can focus more on the development 
> and logic! Add such a helpful community. Thank you for all your help!
>
> On Friday, February 12, 2016 at 4:36:56 PM UTC-5, billmac...@gmail.com 
> wrote:
>>
>> Look at that!
>>
>> request.args(0)
>> '1'
>>
>> Thank you Val. This is great. 
>>
>> On Friday, February 12, 2016 at 4:25:18 PM UTC-5, billmac...@gmail.com 
>> wrote:
>>>
>>> My bad. I forgot the my_util.py
>>>
>>> On Friday, February 12, 2016 at 4:10:00 PM UTC-5, Val K wrote:

 it's easy:
 1. Place modal_wrapper() function in  your_web2py_app/modUles  named 
 'my_util.py' (just for example) - you have to import html-helpers in it:  

 from gluon.html import *

  2. In view place:
 ...
 {{=BUTTON( 'Apply',_type="button",_class = "btn 
 btn-default",_onclick="$('#*cont_id*').modal('show')")}} 

 {{from my_util import *}}

 {{=modal_wrapper(   LOAD(f='*modal_content**.load*', *args=id,*   ajax=
 True, ajax_trap=True  )  , _id='*cont_id*', header='Header', 
 footer='footer')  }} 

 3. Remove all about modal from main_page() 



  писал(а) в своём письме Fri, 12 Feb 2016 
 23:40:08 +0300:

 What I mean by passing argument from the view to the controller is this 
 (let us consider in my view):


 (1) >>>  href="{{=URL('my_controler_def',args=id)}}">Apply

 (2) >>> onclick='window.open("{{=URL("my_controler_def",args=id)}}", 
 "mywindow");'>Apply


 In the above (1) is calling that URL with an argument id. (2) is a 
 button, when I click on that, it goes to the controller function 
 my_controler_def, and in my_controler_def I will have that "id" argument 
 passed on.

 I was hoping to do the same with the model. That with a button I can 
 pass an argument from my view to the controller modal_content 



 On Friday, February 12, 2016 at 3:29:47 PM UTC-5, Val K wrote:
>
>
> OK,  but what do you mean under "pass that argument from my view" ?
> view is processed and rendered to html page at server side,   JS runs 
> only  on the client side.
> so, if you can pass arg from veiw (i.e. arg is defined on server 
> side), also  you can pass it in main_page():
>
> def main_page():
>
> main_pg=DIV()
> 
> m_cont = LOAD(f='*modal_content**.load*', *args=[1],*   ajax=True, 
> ajax_trap=True  )  # - must works, I'm sure while modal_content() 
> runs  "int(request.args(0)) == 1"  will be true
>...
>
>
>
>
>  писал(а) в своём письме Fri, 12 Feb 2016 
> 23:04:08 +0300:
>
> What I have done with your code is change the contoller to be:
>
>
> def main_page():
> main_pg=DIV('hello world')
> m_cont = LOAD(f='modal_content.load', ajax=True, ajax_trap=True  ) 
>  
> dialog = modal_wrapper(m_cont, _id='cont_id', header='Header', 
> footer='footer')
> #show_modal_btn = BUTTON( 'Show modal',_type="button",_class = 
> "btn btn-default",_onclick=""" $('#cont_id').modal('show')   """)
> #don't forget to add dialog and show_modal_btn to main page
> #main_pg.append(show_modal_btn)   # or main_pg.append( 
> DIV(show_modal_btn)  ) or something else
> main_pg.append(dialog)
> return dict(main_pg = main_pg)
>
>
> And in my view I have (I am making an example here):
>
> {{extend 'layout.html'}}
> {{=main_pg}}
>
> {{=BUTTON( 'Apply',_type="button",_class = "btn 
> btn-default",_onclick="$('#cont_id').modal('show')")}}
>
> Works fine. Because I see the button and I click and see the pop up. 
> Great. Only issue is, I need to update the table with my argument. For 
> example:
>
> def modal_content():
> db.mytable.id.default = request.args(0) #Just an example.
> form = SQLFORM(db.mytable) # or even form = SQLFORM.grid(...)
> return dict(form=form)
>
>
> So, I need to pass that argument from my view to the controller of the 
> form. Only thing I have at my disposal is the button. 
>
>
>
> On Friday, February 12, 2016 at 2:25:36 PM UTC-5, Val K wrote:
>>
>>
>> I mean passing args/vars in main_page(): 
>>
>> def main_page():
>>
>> main_pg=DIV()
>> 
>> m_cont = LOAD(f='*modal_content**.load*', *args=[ > args>],  vars={ }*,   ajax=True, ajax_trap=True  ) 
>>>

Re: [web2py] Re: Using tinymce for text areas of in component views


 

I tried that and it did *NOT* work with *Web2Py Components* 

 
—» 
*http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components--LOAD-and-Ajax*

But it does work well on normal HTML Forms submission.
So, are you sure that it worked for you with Web2Py Components 
?
 
If so, then I am doing something wrong.
*(And do you really know about Web2Py Components 

 as 
I am referring to here? Please click the link to know what exactly I am 
referring to by Web2Py Components 
.
 
That will give you a better idea of what I am trying to do, and also, what 
I might be getting wrong as well.)*

Thanks a lot – for the code! Now, make it work with *LOAD()* – that is what 
I am trying to do.

 



On Wednesday, 17 February 2016 08:37:27 UTC-5, Javier Pepe wrote:
>
> Hello
>
> This work for me:
>
> Controller:
> def textarea():
> form=FORM('Texto:',
>   TEXTAREA(_name='texto', 
> requires=IS_NOT_EMPTY(),_id='mytextarea'),
>   INPUT(_type='submit'))
> return locals()
>
> View:
>
> 
>   
>   tinymce.init({
> selector: '#mytextarea'
>   });
>   
> {{extend 'layout.html'}}
> {{=form}}
>
>

-- 
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.


Re: [web2py] Re: Progress bars and session


>
>
> Perhaps you should update a field in some db table and use it instead of 
> session. 
>

Please note that the end of this, is to create an ajax progress bar that 
indicates the numbers of records being inserted on a request.

Although that might work as well, still it isnt good to read and write a 
record each second (progress update interval) when im performing the 
insertion of 30k records. 

The optimal way to solve this is, as your company name indicates, is 
persistent memory, so the session was my first choice until Anthony said 
that it has to be written to disk. And either writing to disk or db isnt 
good.

web2py Scheduler is a candidate to solve a problem like this but im not 
sure yet. 
Check the progress of a background job, might do the trick or caching a 
variable in ram (althought the variable has to be updated frequently) or 
even a temporary memory table in the db.

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.


Re: [web2py] Re: Progress bars and session

Yes, I would say cache.ram might be a better approach. Also, keep in mind 
that although you might want to check every second or two, you don't have 
to update the progress variable after every single record insertion. For 
example, for a precision of 1%, just update the progress after every 300 
insertions.

Anthony

On Wednesday, February 17, 2016 at 10:06:33 AM UTC-5, Alfonso Serra wrote:
>
>
>> Perhaps you should update a field in some db table and use it instead of 
>> session. 
>>
>
> Please note that the end of this, is to create an ajax progress bar that 
> indicates the numbers of records being inserted on a request.
>
> Although that might work as well, still it isnt good to read and write a 
> record each second (progress update interval) when im performing the 
> insertion of 30k records. 
>
> The optimal way to solve this is, as your company name indicates, is 
> persistent memory, so the session was my first choice until Anthony said 
> that it has to be written to disk. And either writing to disk or db isnt 
> good.
>
> web2py Scheduler is a candidate to solve a problem like this but im not 
> sure yet. 
> Check the progress of a background job, might do the trick or caching a 
> variable in ram (althought the variable has to be updated frequently) or 
> even a temporary memory table in the db.
>
> 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: SQLFORM.grid orderby by links

No, ordering is done via the database query.

Anthony

On Wednesday, February 17, 2016 at 8:24:09 AM UTC-5, Omicron VT wrote:
>
> In SQLFORM.grid is possible to order the results by a links field ?
>
> Example :
>
> links = [{'header':'ValueX2', 'body' : lambda row : row.value*2}]
> orderby = HERE IS WHERE MY QUESTION GOES
> grid = SQLFORM.grid(db.mydb , links=links,orderby=orderby)
>

-- 
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] Smartgrid and onvalidation for child tables

Hello everyone, according to the Book, the smartgrid can be passed a map of 
parameters, eg searchable=dict(parent=True, child=False), and this will be 
passed to the appropriate grids that the smartgrid creates. 

Now I am wondering how to pass an onvalidation call back to both a parent 
and a child. Here's my code

def documents():
response.title = 'Employee Documents '

get_default_company_id() or redirect(URL('company', 'companies'))
grid = SQLFORM.smartgrid(db.employee, deletable=False, 
linked_tables=['employee_document'], csv=False,
 orderby=dict(employee=db.employee.last_name,
  
employee_document=db.employee_document.document_type),
 onvalidation=dict(employee=on_validate, 
employee_document=on_validate_doc),
 showbuttontext=dict(employee=False, 
employee_document=False)
 )
return dict(grid=grid)


but this results in an error


 Invalid key in onvalidate dict

If I remove the onvalidation part from the above code, it runs fine.

So my question again is, how do I pass a function to be called for onvalidation 
for a child grid created from a smartgrid? 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] multiple versions of same table in database folder

I see multiple versions of all of the tables in the database folder.

Is this a problem? Should I manually delete oldest versions and leave most 
recent?

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: My web2py app adjusts according to the browser on mobile and look odd? How to load it like Chrome?

for example lovecalculator.pythonanywhere.com opens very differently on 
mobile and looks bad

On Wednesday, February 17, 2016 at 10:09:58 AM UTC+5:30, RAGHIB R wrote:
>
> The background-image and everything looks curbed, not suited according to 
> browser. How to always open a standard size like that which opens in google 
> chrome?
>

-- 
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: Smartgrid and onvalidation for child tables

Hmm, doesn't appear to support all of the grid arguments:

for key in 
'columns,orderby,searchable,sortable,paginate,deletable,editable,details,selectable,create,fields'
.split(','):

Maybe make a feature request on Github to include all of the grid 
arguments, not just those above.

Anthony

On Wednesday, February 17, 2016 at 11:48:49 AM UTC-5, Seraaj Muneer wrote:
>
> Hello everyone, according to the Book, the smartgrid can be passed a map 
> of parameters, eg searchable=dict(parent=True, child=False), and this will 
> be passed to the appropriate grids that the smartgrid creates. 
>
> Now I am wondering how to pass an onvalidation call back to both a parent 
> and a child. Here's my code
>
> def documents():
> response.title = 'Employee Documents '
>
> get_default_company_id() or redirect(URL('company', 'companies'))
> grid = SQLFORM.smartgrid(db.employee, deletable=False, 
> linked_tables=['employee_document'], csv=False,
>  orderby=dict(employee=db.employee.last_name,
>   
> employee_document=db.employee_document.document_type),
>  onvalidation=dict(employee=on_validate, 
> employee_document=on_validate_doc),
>  showbuttontext=dict(employee=False, 
> employee_document=False)
>  )
> return dict(grid=grid)
>
>
> but this results in an error
>
>
>  Invalid key in onvalidate dict
>
> If I remove the onvalidation part from the above code, it runs fine.
>
> So my question again is, how do I pass a function to be called for 
> onvalidation for a child grid created from a smartgrid? 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: regarding permission

Hi!
There is a model only in your message, what does your controller like? 
After "auth = Auth(db)",  auth.user_id == id of logged in user (None means 
nobody logged in) 
 

On Wednesday, February 17, 2016 at 12:36:53 PM UTC+3, prashant joshi wrote:
>
> is there any way to provide permission to the admin to update and delete 
> data from the table and provide user only to read it?
>
>  
> db = DAL("postgres://postgres:postgres@localhost:5432/tripti1")
> from gluon.tools import Auth
> auth = Auth(db)
> auth.define_tables(username=False,signature=False)
>
>
>
> db.define_table('stud_person',
>   Field('image', 'upload'),
>   Field('first_name', requires=IS_NOT_EMPTY()),
>   Field('middle_name', requires=IS_NOT_EMPTY()),
>   Field('last_name', requires=IS_NOT_EMPTY()),
>   Field('email_id', requires=IS_NOT_EMPTY()))
>
>
> till now i have done this after this what to do i'm not getting?can anyone 
> help me???
>
>

-- 
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.


Re: [web2py] Re: Progress bars and session

Ive adapted the code to use cache.ram, but the docs about this mechanism is 
quite confusing, and i can't get it to work.

There are several questions like, 
how to store simple values instead callables? 
what happens if i access a cache value after expiration?

This is the code:

def getprogress():
print "progress", cache.ram.storage['message'][1]
return cache.ram.storage['message'][1]

def progress():
# when a form is submitted, change progress each second
if request.post_vars:
for i in range(5):
message = cache.ram('message', lambda: i, time_expire=1)
print "main:", message
sleep(1)
return "done"
else:
message = cache.ram('message', lambda: -1, time_expire=1)
return locals()

Something weird happens at the python console 
print "progress", cache.ram.storage['message'][1]
doesnt get printed on its own line, but the important thing is that im not 
accessing the declared message value. 

And i get a log like this
progress progress progress progress main: 0
progress main: 1
progress progress progress main: 2
progress main: 3
progress main: 4
progress

Any idea on what's wrong?

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.


Re: [web2py] Re: Smartgrid and onvalidation for child tables

Ah OK great. I'll have to raise a github request then.
On 17 Feb 2016 20:15, "Anthony"  wrote:

> Hmm, doesn't appear to support all of the grid arguments:
>
> for key in
> 'columns,orderby,searchable,sortable,paginate,deletable,editable,details,selectable,create,fields'
> .split(','):
>
> Maybe make a feature request on Github to include all of the grid
> arguments, not just those above.
>
> Anthony
>
> On Wednesday, February 17, 2016 at 11:48:49 AM UTC-5, Seraaj Muneer wrote:
>>
>> Hello everyone, according to the Book, the smartgrid can be passed a map
>> of parameters, eg searchable=dict(parent=True, child=False), and this will
>> be passed to the appropriate grids that the smartgrid creates.
>>
>> Now I am wondering how to pass an onvalidation call back to both a parent
>> and a child. Here's my code
>>
>> def documents():
>> response.title = 'Employee Documents '
>>
>> get_default_company_id() or redirect(URL('company', 'companies'))
>> grid = SQLFORM.smartgrid(db.employee, deletable=False, 
>> linked_tables=['employee_document'], csv=False,
>>  orderby=dict(employee=db.employee.last_name,
>>   
>> employee_document=db.employee_document.document_type),
>>  onvalidation=dict(employee=on_validate, 
>> employee_document=on_validate_doc),
>>  showbuttontext=dict(employee=False, 
>> employee_document=False)
>>  )
>> return dict(grid=grid)
>>
>>
>> but this results in an error
>>
>>
>>  Invalid key in onvalidate dict
>>
>> If I remove the onvalidation part from the above code, it runs fine.
>>
>> So my question again is, how do I pass a function to be called for 
>> onvalidation for a child grid created from a smartgrid? 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/WG28up_5YCs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.factory - form.process().accepted fails first time but works after that

It seems after first click your form is reloaded, may be there is nested 
forms in your html-page or  something else.
What does your LOAD-call like? try  ajax=true or  ajax_trap=true 


On Wednesday, February 17, 2016 at 12:17:04 AM UTC+3, Jim S wrote:
>
> I have a simple SQLFORM.factory form.
>
> Sometimes when I click on the submit button the 
> form.process(keepvalues=True).accepted returns False - clicking on enter 
> immediately following results in it returning True.  I'm not getting any 
> error or flash messages.
>
> I don't know where to begin looking for my problem.
>
> Here is the relevant code:
>
> fields = []
> fields.append(Field('brix_level', 'decimal(5,2)', required=True, requires=
> IS_FLOAT_IN_RANGE(70, 99),
>  default=wo.brix_level))
>
> form = SQLFORM.factory(*fields)
>
> form.element(_name='brix_level').update(_class='form-control')
>
> if form.process(keepvalues=True).accepted:
>
> Sometimes it will return False, and then re-submitting with no changes on 
> screen, it will return True.
>
> This is happening in my form that is in a LOADed Component in a bootstrap 
> modal window.
>
> Sequence of events:
>
> 1. Click button to display the modal window and the form.
> 2. Change brix level from 86 to 85
> 3. Click on submit
>
> form.process().accepted returns False
>
> brix level on the form field returns to 86
>
> 4. Change brix level from 86 to 85
> 5. Click on Submit
>
> Everything works fine...
>
> Any ideas what I'm missing?
>
> -Jim
>

-- 
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: apache2/pam/pwauth to remove www-data from shadow group

Digging into this more, I have learned that the pam calls in the pam.py 
module use the username than is trying to authenticate and pwauth requires 
the www-data userid.  There is some other magic with 
apache2/mod-authnz-external 
that makes this work with htaccess.  I tried adding a 
pam_set_item(PAM_RUSER, 'www-data') to pam.py, which works:

Feb 16 16:28:21 tibs2 apache2: pam_unix(pwauth:auth): authentication 
failure; logname= uid=33 euid=33 tty= ruser=www-data rhost= user=kwebb

but the authentication is still failing, so I clearly do not understand how 
pam works yet, but I do desire that web2py use pam w/o needing to add 
www-data to the shadow group in /etc/group.

On Tuesday, February 16, 2016 at 2:42:54 PM UTC-7, kw...@teradactyl.com 
wrote:
>
> 'm trying to get UNIX logins working using pam.  I was able to get the 
> user login to work if I add www-data to the shadow group.  To get this 
> working, I had to add www-data to the shadow group.  This is considered a 
> bad practice, and pwauth is possibly the solution.  I was able to confgure 
> pwauth and test it with htaccess to get it working.  In my apache config I 
> added:
>
>   AddExternalAuth pwauth /usr/sbin/pwauth
>   SetExternalAuthMethod pwauth pipe
>
>   
> 
>   Order deny,allow
>   Allow from all
> 
> AuthType Basic
> AuthName "Restricted"
> AuthBasicProvider external
> AuthExternal pwauth
> require valid-user
>   
>
> Next, in gluon/contrib/login_methods, I changed the pam service in the 
> authenticate() call:
>
> return authenticate(username, password, service='pwauth')
>
> From /var/log/auth.log I get:
>
> Feb 16 14:10:27 tibs2 unix_chkpwd[11030]: check pass; user unknown
> Feb 16 14:10:27 tibs2 unix_chkpwd[11030]: password check failed for user 
> (kwebb)
> Feb 16 14:10:27 tibs2 apache2: pam_unix(pwauth:auth): authentication 
> failure; logname= uid=33 euid=33 tty= ruser= rhost= user=kwebb
>
> It works if I go back and add www-data to the shadow group in /etc/passwd. 
>  I've also found some references to this in an Ubuntu 14.04 install
> for web2py which I am trying to avoid:
>
> usermod -a -G shadow www-data
>
> Here is my pam config file for pwauth:
>
> #
> # The PAM configuration file for the `pwauth' service
> #
>
> # Disallows other than root logins when /etc/nologin exists
> # (Replaces the `NOLOGINS_FILE' option from login.defs)
> auth requisite pam_nologin.so
>
> # Standard Un*x authentication.
> @include common-auth
>
> # Standard Un*x account
> @include common-account
>
>

-- 
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.factory - form.process().accepted fails first time but works after that

I have them both set to True.  

Anthony - no time yet to package up a sample...  Will see if I can find 
time tomorrow.

-Jim

On Wednesday, February 17, 2016 at 3:00:39 PM UTC-6, Val K wrote:
>
> It seems after first click your form is reloaded, may be there is nested 
> forms in your html-page or  something else.
> What does your LOAD-call like? try  ajax=true or  ajax_trap=true 
>
>
> On Wednesday, February 17, 2016 at 12:17:04 AM UTC+3, Jim S wrote:
>>
>> I have a simple SQLFORM.factory form.
>>
>> Sometimes when I click on the submit button the 
>> form.process(keepvalues=True).accepted returns False - clicking on enter 
>> immediately following results in it returning True.  I'm not getting any 
>> error or flash messages.
>>
>> I don't know where to begin looking for my problem.
>>
>> Here is the relevant code:
>>
>> fields = []
>> fields.append(Field('brix_level', 'decimal(5,2)', required=True, requires
>> =IS_FLOAT_IN_RANGE(70, 99),
>>  default=wo.brix_level))
>>
>> form = SQLFORM.factory(*fields)
>>
>> form.element(_name='brix_level').update(_class='form-control')
>>
>> if form.process(keepvalues=True).accepted:
>>
>> Sometimes it will return False, and then re-submitting with no changes on 
>> screen, it will return True.
>>
>> This is happening in my form that is in a LOADed Component in a bootstrap 
>> modal window.
>>
>> Sequence of events:
>>
>> 1. Click button to display the modal window and the form.
>> 2. Change brix level from 86 to 85
>> 3. Click on submit
>>
>> form.process().accepted returns False
>>
>> brix level on the form field returns to 86
>>
>> 4. Change brix level from 86 to 85
>> 5. Click on Submit
>>
>> Everything works fine...
>>
>> Any ideas what I'm missing?
>>
>> -Jim
>>
>

-- 
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.


Re: [web2py] Re: Progress bars and session



> return cache.ram.storage['message'][1]
>

Where did you see that as the way to access cached values? That is not the 
proper API. Note, cache.ram.storage is not initialized until cache.ram has 
been called at least once, so unless you have a cache.ram() somewhere prior 
in the same request, cache.ram.storage will be an empty dictionary.

Instead, you should use the proper API:

return cache.ram('message', lambda: None, None)

Using None as the third argument means the existing cached value will be 
retrieved (so the output of the lambda function is irrelevant, as it will 
never be called).
 

> def progress():
> # when a form is submitted, change progress each second
> if request.post_vars:
> for i in range(5):
> message = cache.ram('message', lambda: i, time_expire=1)
>

Note, here you want to make sure you update the cached value no matter 
what, so set time_expire to 0:

message = cache.ram('message', lambda: i, time_expire=0)

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.factory - form.process().accepted fails first time but works after that

Note, ajax_trap is irrelevant if ajax=True (it just indicates forms should 
be trapped within non-ajax components).

Anthony

On Wednesday, February 17, 2016 at 4:35:43 PM UTC-5, Jim S wrote:
>
> I have them both set to True.  
>
> Anthony - no time yet to package up a sample...  Will see if I can find 
> time tomorrow.
>
> -Jim
>
> On Wednesday, February 17, 2016 at 3:00:39 PM UTC-6, Val K wrote:
>>
>> It seems after first click your form is reloaded, may be there is nested 
>> forms in your html-page or  something else.
>> What does your LOAD-call like? try  ajax=true or  ajax_trap=true 
>>
>>
>> On Wednesday, February 17, 2016 at 12:17:04 AM UTC+3, Jim S wrote:
>>>
>>> I have a simple SQLFORM.factory form.
>>>
>>> Sometimes when I click on the submit button the 
>>> form.process(keepvalues=True).accepted returns False - clicking on enter 
>>> immediately following results in it returning True.  I'm not getting any 
>>> error or flash messages.
>>>
>>> I don't know where to begin looking for my problem.
>>>
>>> Here is the relevant code:
>>>
>>> fields = []
>>> fields.append(Field('brix_level', 'decimal(5,2)', required=True, 
>>> requires=IS_FLOAT_IN_RANGE(70, 99),
>>>  default=wo.brix_level))
>>>
>>> form = SQLFORM.factory(*fields)
>>>
>>> form.element(_name='brix_level').update(_class='form-control')
>>>
>>> if form.process(keepvalues=True).accepted:
>>>
>>> Sometimes it will return False, and then re-submitting with no changes 
>>> on screen, it will return True.
>>>
>>> This is happening in my form that is in a LOADed Component in a 
>>> bootstrap modal window.
>>>
>>> Sequence of events:
>>>
>>> 1. Click button to display the modal window and the form.
>>> 2. Change brix level from 86 to 85
>>> 3. Click on submit
>>>
>>> form.process().accepted returns False
>>>
>>> brix level on the form field returns to 86
>>>
>>> 4. Change brix level from 86 to 85
>>> 5. Click on Submit
>>>
>>> Everything works fine...
>>>
>>> Any ideas what I'm missing?
>>>
>>> -Jim
>>>
>>

-- 
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.


Re: [web2py] Re: Progress bars and session

Omg it did work!. Thanks you very much Anthony, i owe you one.

Console log:
progress -1
progress -1
main: 0
progress 0
main: 1
progress 1
main: 2
progress 2
main: 3
progress 3
main: 4
progress 4

 

-- 
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] multiple versions of same table in database folder

The table files contain the field information. The info is created and updated 
by the automatic web2py database migrations (if migration is on). Old versions 
can be removed.
If migration is switched off, like on a production servers, you can remove the 
table files. See the DAL section in the Web2py book.

Nico de Groot

-- 
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.