[web2py] Re: I was thinking about python2 clock

2018-03-20 Thread Leonel Câmara
I'm guessing the rewrite will take some time. One thing you can do is to 
report any python3 problems you find with web2py while you do it. We'll fix 
them.  
  
We've fixed many many python 3 compatibility problems on the last months, 
you should be fine.

-- 
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] Annoncement - web2py_lazy_options_widget.py

2018-03-20 Thread Richard
Hello,

I give a go over my customized version of plugin_lazy_options_widget.py and 
improve it. It includes severals enhancement over the original Kenji 
version... 

Hope it could serve someone.

Here the github repository :

https://github.com/BuhtigithuB/web2py_lazy_options_widget

Enjoy it.

py3 portage help is welcome

Thanks

Richard

-- 
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: how to keepvalues in SQLform.grid search form after submission

2018-03-20 Thread Anthony
.grid() takes a "formargs" argument, which is a dictionary of arguments to 
pass to the grid forms. There are also the more specific "createargs", 
"editargs", and "viewargs" arguments, for create, edit, and view forms, 
respectively.

Anthony

On Tuesday, March 20, 2018 at 2:09:09 PM UTC-4, Shrabya Timsina wrote:
>
> Hello, I really like the keepvalues option for the form/sqlform objects 
> where you can pass it to their process/accepts method. 
> I understand the grid object also has an underlying sqlform, but I do not 
> understand how to access that in order to use its keepvalues=True option. 
> Based on my search, it seems like I have to use the onupdate parameter of 
> grid but I do not understand how to use it. Please help.
>

-- 
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] how to keepvalues in SQLform.grid search form after submission

2018-03-20 Thread Shrabya Timsina
Hello, I really like the keepvalues option for the form/sqlform objects 
where you can pass it to their process/accepts method. 
I understand the grid object also has an underlying sqlform, but I do not 
understand how to access that in order to use its keepvalues=True option. 
Based on my search, it seems like I have to use the onupdate parameter of 
grid but I do not understand how to use it. Please help.

-- 
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: Multiple dicts for querying multiple tables

2018-03-20 Thread Anthony
You are returning an empty dict - you need to add those three items to it.

-- 
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: Multiple dicts for querying multiple tables

2018-03-20 Thread En Ware
Anthony, 
   
   I'm probably doing something wrong with the view then, 

I get an error if I try to call the dict in a view. 

{{extend 'layout.html'}}

Watch and Defend 



 Links:
http://localhost:8081/Hunter/default/foxtel_search;>Show 
Foxtel Records  {{=get_foxtel_count}}


http://localhost:8081/Hunter/default/lgi_search;>Show LGI 
Records{{=get_lgi_count}}

http://localhost:8081/Hunter/default/adobe_search;>Show 
Adobe Records{{=get_adobe_count}}



1.
2.
3.
4.
5.
6.

Traceback (most recent call last):
  File "/Users/aaronm/.env/python/web2py/web2py/gluon/restricted.py", line 219, 
in restricted
exec(ccode, environment)
  File 
"/Users/aaronm/.env/python/web2py/web2py/applications/Hunter/views/default/index.html",
 line 116, in 
NameError: name 'get_lgi_count' is not defined





On Tuesday, March 20, 2018 at 9:19:08 AM UTC-5, Anthony wrote:
>
> A dict can have multiple keys, so feel free to return a dict that includes 
> all three results. Of course, you can also put all three values into a 
> single object (e.g., a dict, list, or tuple), and then just return that 
> single object to the view.
>
> Anthony
>
> On Tuesday, March 20, 2018 at 9:59:21 AM UTC-4, En Ware wrote:
>>
>> Hello, 
>>
>> Trying to get the full count on three different tables. Below is a 
>> sample code. I am only able to call one count at a time. Is it possible to 
>> query all three of these and show them in a view?  
>>
>> def index():
>> get_foxtel_count=db(db.foxtel_hunter.id > 0).count()
>> get_lgi_count=db(db.lgi_hunter.id > 0).count()
>> get_adobe_count=db(db.adobe_hunter.id > 0).count()
>> #return dict(get_foxtel_count=get_foxtel_count)
>> #return dict(get_lgi_count=get_lgi_count)
>> #return dict(get_adobe_count=get_adobe_count)
>>
>> return dict()
>>
>>
>>

-- 
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: Multiple dicts for querying multiple tables

2018-03-20 Thread Anthony
A dict can have multiple keys, so feel free to return a dict that includes 
all three results. Of course, you can also put all three values into a 
single object (e.g., a dict, list, or tuple), and then just return that 
single object to the view.

Anthony

On Tuesday, March 20, 2018 at 9:59:21 AM UTC-4, En Ware wrote:
>
> Hello, 
>
> Trying to get the full count on three different tables. Below is a 
> sample code. I am only able to call one count at a time. Is it possible to 
> query all three of these and show them in a view?  
>
> def index():
> get_foxtel_count=db(db.foxtel_hunter.id > 0).count()
> get_lgi_count=db(db.lgi_hunter.id > 0).count()
> get_adobe_count=db(db.adobe_hunter.id > 0).count()
> #return dict(get_foxtel_count=get_foxtel_count)
> #return dict(get_lgi_count=get_lgi_count)
> #return dict(get_adobe_count=get_adobe_count)
>
> return dict()
>
>
>

-- 
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: OAUTH2.0 help

2018-03-20 Thread greenpoise
Thanks Dave. I will take a lookt that. The workflow is pretty much the one you 
sent. I found a few examples that i was able to follow with some modifications. 
OAuth documentation had the best one that followed exactly the same workflow i 
needed with the difference that the provider has a predetermined callback. 
Thanks again

-- 
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 dicts for querying multiple tables

2018-03-20 Thread En Ware
Hello, 

Trying to get the full count on three different tables. Below is a 
sample code. I am only able to call one count at a time. Is it possible to 
query all three of these and show them in a view?  

def index():
get_foxtel_count=db(db.foxtel_hunter.id > 0).count()
get_lgi_count=db(db.lgi_hunter.id > 0).count()
get_adobe_count=db(db.adobe_hunter.id > 0).count()
#return dict(get_foxtel_count=get_foxtel_count)
#return dict(get_lgi_count=get_lgi_count)
#return dict(get_adobe_count=get_adobe_count)

return dict()


-- 
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: Angular 2 and web2py

2018-03-20 Thread Anthony
On Tuesday, March 20, 2018 at 3:49:35 AM UTC-4, anil.a...@capitalfloat.com 
wrote:
>
> Hi Anthony , 
>
> We have defined that variable in python controller.py as exmple below.
> Its broadcasted to index file using locals();
>
> *def adhar():*
> * response.view = "angular/adhar/index.html"*
> * return locals()*
>

I don't see the variable in question in the above function, so perhaps you 
mean you have defined it at the top level of the controller. If that is the 
case, it will not be available in any views -- locals() is a dictionary 
including only variables defined locally within the function that contains 
it.

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: Angular 2 and web2py

2018-03-20 Thread anil.arya via web2py-users
Hi Anthony , 

We have defined that variable in python controller.py as exmple below.
Its broadcasted to index file using locals();

*def adhar():*
* response.view = "angular/adhar/index.html"*
* return locals()*

On Thursday, March 15, 2018 at 9:17:17 PM UTC+5:30, Anthony wrote:
>
> On Thursday, March 15, 2018 at 11:05:56 AM UTC-4, anil...@capitalfloat.com 
>  wrote:
>>
>> I tried integrating angular5+ framework in my already existing  web2py 
>> framework and Its running fine, Changed delimiter and interpolation in 
>> angular .   I am not able to fetch variables defined in web2py from script 
>> tag in index.html, is the only issue 
>>
>> For exp : 
>>
>>   
>> var baseUrl = "{{=BASE_PATH_APPFORM}}";//  Not able to render 
>> web2py variable here in index.html 
>> 
>>
>
> What happens instead? Do you get an error? Where is that variable defined?
>
> 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.