Re: [web2py] Using db.table.format (i.e. format attr outside of table definition)

2019-07-08 Thread Val K
Show your code, please

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/51b9b514-00da-4873-8bab-879c4cf2cc51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: please help testing web3py

2019-07-08 Thread Massimo Di Pierro
LOL. I love the spinnig gears.

You have an older version of pydal. Can you uninstall and pip3 install it 
again

On Monday, 8 July 2019 16:04:23 UTC-7, Stephan wrote:
>
> As far as I can tell, it works under macOS 10.14.5, I was able to generate 
> a new app from the admin dashboard. 
> However, apart from the missing favicon, the console reports these errors:
>
> ERROR:root:Traceback (most recent call last):
>
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web3py/core.py",
>  
> line 429, in wrapper
>
> ret = func(*func_args, **func_kwargs)
>
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web3py/core.py",
>  
> line 395, in wrapper
>
> ret = func(*args, **kwargs)
>
>   File "/Users/stp/Sites/web3py/myapps/_dashboard/__init__.py", line 178, 
> in api
>
> from pydal.restapi import RestAPI, ALLOW_ALL_POLICY, DENY_ALL_POLICY
>
> ModuleNotFoundError: No module named 'pydal.restapi'
>
>
> Please remove these spinning gears!
>
>
>
>
>
> Am Sonntag, 7. Juli 2019 05:57:26 UTC+2 schrieb Massimo Di Pierro:
>>
>> Let's test the dashboard today:
>>
>> # download web2py from pypi
>>
>> python3 -m pip install web3py
>>
>> # start it:
>>
>> web3py-start myapps
>>
>> (pick a one time password  and answer yes when it wants to create 
>> something, it will create myapps folder and a temp .web3py-service folder)
>>
>> # open browser
>>
>> http://127.0.0.1:8000/_dashboard
>>
>> Now create a new app by cloning scaffold
>>
>> Does it work?
>> How does it flow?
>> What explanations should be necessary?
>> Can you write a brief documentation of your experience for other users?
>>
>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a28a8043-f0b2-4905-b0dc-13f0d0440e67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] please help testing web3py

2019-07-08 Thread Massimo Di Pierro
please delete the apps folder and let it re-create it

On Sunday, 7 July 2019 22:10:47 UTC-7, Nico Zanferrari wrote:
>
> It runs fine on Windows 10, too.
> But I'm not able to create a new user and it also complains about missing 
> favicon.ico.
>
> Nico
>
> Il Lun 8 Lug 2019, 01:56 黄祥  ha scritto:
>
>> run well on docker container : ubuntu and mac
>>
>> best regards,
>> stifan
>>
>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/7f68121a-d157-4445-97e1-57aff3ed8fd0%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/14ce78c3-aea3-47b5-babd-f3b04c4a8bbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] 'Storage' object is not callable

2019-07-08 Thread imran tube
 'Storage' object is not callable
: where is my wrong my code view or controller or web2py problem ?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bc265516-cdec-4d7e-8748-bb2c6d853175%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to pass the variable in Jquery in view to controller

2019-07-08 Thread Scott Hunter
The short answer is, you don't.  Javascript is being executed in the 
browser; controller code is executed on the server.

The longer answer is that the browser can make a request to the server (via 
ajax or some other mechanism) that can cause controller code to be 
executed.  I think you'll need to provide more details of what you are 
trying to do before someone can w/ details.

On Monday, July 8, 2019 at 5:45:29 PM UTC-4, Quang Lam wrote:
>
> Hi All, i would like to pass the variable clickedFlight in Jquery in view 
> to one of the functions named custom_view_search in view.py in controller. 
> Please show me how. Thanks
>
>
> $(document.body).on("contextmenu", "table tr", function(e) {
> var tableData = $(this).children("td").map(function(){
> return $(this).text();
> }).get();
> var clickedFlight = tableData[0]
> alert(clickedFlight);
> contextMenu.css({
>   display: "block",
>   left: e.clientX,
>   
>   //TODO: figure out why I have to hardcode this value to get 
> the menu to appear in correct place
>   //...Y axis page value not correctly displaying on table
>   top:  e.clientY - 80
>  }); 
>  return false;
>  
> });
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/5257ab77-2e11-4824-b5b1-1876693d2034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: please help testing web3py

2019-07-08 Thread Stephan
As far as I can tell, it works under macOS 10.14.5, I was able to generate 
a new app from the admin dashboard. 
However, apart from the missing favicon, the console reports these errors:

ERROR:root:Traceback (most recent call last):

  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web3py/core.py",
 
line 429, in wrapper

ret = func(*func_args, **func_kwargs)

  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web3py/core.py",
 
line 395, in wrapper

ret = func(*args, **kwargs)

  File "/Users/stp/Sites/web3py/myapps/_dashboard/__init__.py", line 178, 
in api

from pydal.restapi import RestAPI, ALLOW_ALL_POLICY, DENY_ALL_POLICY

ModuleNotFoundError: No module named 'pydal.restapi'


Please remove these spinning gears!





Am Sonntag, 7. Juli 2019 05:57:26 UTC+2 schrieb Massimo Di Pierro:
>
> Let's test the dashboard today:
>
> # download web2py from pypi
>
> python3 -m pip install web3py
>
> # start it:
>
> web3py-start myapps
>
> (pick a one time password  and answer yes when it wants to create 
> something, it will create myapps folder and a temp .web3py-service folder)
>
> # open browser
>
> http://127.0.0.1:8000/_dashboard
>
> Now create a new app by cloning scaffold
>
> Does it work?
> How does it flow?
> What explanations should be necessary?
> Can you write a brief documentation of your experience for other users?
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/938256d9-4b64-4dff-af56-38dd56e98951%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Display a list in SQLFORM.grid

2019-07-08 Thread Dave S


On Thursday, July 4, 2019 at 11:45:48 PM UTC-7, Massimo Di Pierro wrote:
>
> Can you explain more in detail what you want to do?
>

At the risk of demonstrating that I'm not a mind-reader,
I'm going to suggest that give a list
[x,y,z,aa,bb,...]

where each element is in some sense a row (perhaps in the DAL sense),
display each row such that each cell does wrap instead of truncate.
Perhaps only some columns need the wrap, perhaps all.

That is, for element x[j] from the above list, the x[j] ends up 
styled wrap instead of truncate.

Now that I'm out on the limb, where's my saw?

/dps

 

>
> On Tuesday, 11 June 2019 14:16:36 UTC-7, Quang Lam wrote:
>>
>> how could i wrap a list and display it into SQLFORM.grid  to ensure there 
>> is no characters in the list truncated when displayed 
>> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a7094e83-9034-44ad-a45d-a8666ec0a485%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] How to pass the variable in Jquery in view to controller

2019-07-08 Thread Quang Lam
Hi All, i would like to pass the variable clickedFlight in Jquery in view 
to one of the functions in view.py in controller. Please show me how. Thanks


$(document.body).on("contextmenu", "table tr", function(e) {
var tableData = $(this).children("td").map(function(){
return $(this).text();
}).get();
var clickedFlight = tableData[0]
alert(clickedFlight);
contextMenu.css({
  display: "block",
  left: e.clientX,
  
  //TODO: figure out why I have to hardcode this value to get 
the menu to appear in correct place
  //...Y axis page value not correctly displaying on table
  top:  e.clientY - 80
 }); 
 return false;
 
});

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6ac6ae1f-a579-465c-bfd5-f024bf194edb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Jquery

2019-07-08 Thread Quang Lam
Hi All, Does anyone know how to get the data of the field in the selected 
row when the user right click on instead of the data of the whole row. 

//Function to handle context menu appearing/disappearing
$(function() {

var contextMenu  = $("#contextMenu");
var $rowClicked
//body on contextmenu is the event for right clicking
$(document.body).on("contextmenu", "table tr", function(e) {
*alert($(this).text());   // i need the data of one 
field instead of the data of the whole row when the user right click. *
contextMenu.css({
  display: "block",
  left: e.clientX,
  
  //TODO: figure out why I have to hardcode this value to get 
the menu to appear in correct place
  //...Y axis page value not correctly displaying on table
  top:  e.clientY - 80
 }); 
 return false;
 
});
   
var plot_context_menu = $("#plot_context_menu");
var table_container   = $("#table_container");
var plot_container= $("#plot_container");
plot_container.hide();

$(plot_context_menu).click(function(e) {

$('#contextMenu').hide();
table_container.attr('class', 'col-md-6');  

plot_container.show();
 
return false;
});
$('#plot_choice').change(function () {
$('#plot_choice option:selected').each(function(){ 
 
var graph = $( this ).val()
$('.plot_path').hide();
$('#' + graph).show(); 
})
}).change();

});



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0443805e-d66c-472a-828a-2fd0da1de478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Using db.table.format (i.e. format attr outside of table definition)

2019-07-08 Thread Eliezer (Vlad) Tseytkin
Nope, still doesn't work...

On Mon, Jul 8, 2019, 1:20 PM Val K  wrote:

> Try db.table._format=...
>
> --
> 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/pQYWSHh-Pys/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/536b2be5-50c9-483b-858f-247df07cba7f%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CABZ%2BKCD71ygkyScMob51upgOn9AdgC0QTZzmuf9epGR%2B6hwN-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: please help testing web3py

2019-07-08 Thread JSalvat

Not working for me on windows10

c:\wwwroot\web3py>python web3py-start apps

 ___      __  __
|  / / / / __ |/___ \/ __ \ \/ /
| | / / /_  / /_/ /___/ / /_/ /\  /
| | /| / / __/ / __  //__  / / / /
| |/ |/ / /___/ /_/ /___/ / / / /
|___/|_/_/_/_/_/ /_/
It is still experimental...

Choose a one-time dashboad password:
[ ] Unzipping app web3py.app._default.zip
 [A[X]
Dashboard is at: http://127.0.0.1:8000/_dashboard
Traceback (most recent call last):
  File "web3py-start", line 6, in 
main()
  File "c:\wwwroot\web3py\web3py\core.py", line 763, in main
Reloader.import_apps()
  File "c:\wwwroot\web3py\web3py\core.py", line 620, in import_apps
module = importlib.machinery.SourceFileLoader('apps', 
path).load_module()
  File "", line 407, in 
_check_name_wrapper
  File "", line 907, in load_module
  File "", line 732, in load_module
  File "", line 265, in _load_module_shim
  File "", line 696, in _load
  File "", line 677, in _load_unlocked
  File "", line 724, in exec_module
  File "", line 859, in get_code
  File "", line 916, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 
'c:\\wwwroot\\web3py\\apps\\__init__.py'

c:\wwwroot\web3py>

 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/42039d16-eb25-48fc-ac9d-52d41bbf8005%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Using db.table.format (i.e. format attr outside of table definition)

2019-07-08 Thread Val K
Try db.table._format=... 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/536b2be5-50c9-483b-858f-247df07cba7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.