[web2py] Re: grid: top + button: how to adapt dynamically & translate the title 'add record to database' ?

2020-05-04 Thread Luciano Bovio
I have the same problem on translation I have to modify button text 
with jQuery. Any ideas ?

On Monday, February 12, 2018 at 7:01:17 AM UTC-3, Serge Bourgeois wrote:
>
>
> Hello,
> The following codes changes dynamically the title of the button on the top 
> left of the form in English.
> But when I switch to another language (exemple FR), I get the French 
> translation of 'Add record to database', and not the translation of what I 
> have placed in the title of this button.
>
> Example:
>
> form = SQLFOR.smartgrid(db[my_table]..., showbuttontext=False, ...)
>
> if not 'view' in request.args and not 'edit' in request.args and not 
> 'new' in request.args:
>addbutton = form.element(_title='Add record to database')
>my_table = 'my application table'
>addbutton['_title'] = '%s %s' % ( T('Add'), db[my_table]._singular 
> return dict(form = form)
> => in English, the title of the + button is 'Add' + the value of 
> db[my_table]._singular : This is perfect!
> => in French, I always get 'Ajout d'un enregistrement', which is the 
> translation of 'Add record to database'. : this is not what I want...
>
> I have tried the following, but, same result:
>if not 'view' in request.args and not 'edit' in request.args and not 
> 'new' in request.args:
>my_title = T('Add record to database)'
>addbutton = form.element(_title= my_title)
>my_table = 'my application table'
>addbutton['_title'] = '%s %s' % ( T('Add'), db[my_table]._singular 
> return dict(form = form)
>
> Thanks for any advise for translating the title of the top left '+' button 
> when I change if in the controller.
>

-- 
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/58f35739-a7b6-4905-903d-b8d4b04a1c09%40googlegroups.com.


[web2py] web2py - date picker issue

2020-05-04 Thread Anuj Mahawar


I am a beginner to the web2py. I am building an application with a date 
picker on the home page. The issue is - Whenever I try to edit a previous 
day's record and submit, instead of on being on the same date, it is being 
redirected to the current date page. e.g. suppose I have logged in and it 
displays the current date i.e. 29 April 2020. When I try to edit a record 
for 01 April 2020 and submit the entry, it is being redirected to the 
current date i.e. 29 April 2020. Any idea why the application is behaving 
like that?

-- 
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/beb15d2c-a694-4a62-ae74-67255788125a%40googlegroups.com.


Re: [web2py] Re: web2py online debugger under python3

2020-05-04 Thread AGRogers
Hi Clemens

I definitely can't help you with this problem. Sorry. But I am interested
in why you use the online debugger and not something else?

Thanks
Andrew

On Mon, 4 May 2020 at 23:50, Clemens 
wrote:

> Hello Massimo,
>
> I hoped the latest web2py version would fix the problem. My current
> configuration is now:
> web2py version 2.20.4-stable+timestamp.2020.05.03.05.18.50, Running on
> Rocket 1.2.6, Python 3.6.9, Ubuntu 18.04., Firefox 75.0 (64-bit)
>
> But the online debugger still doesn't work. The debugger doesn't catch the
> breakpoint, set in my code. Instead, after waiting a few minutes I got the
> following new situation:
>
> [image: Screenshot_2020-05-04 interact.png]
>
> [image: Screenshot_2020-05-04 interact-02.png]
> Do you have any idea, how I can fix this?
>
> Best regards
> Clemens
>
>
> On Sunday, April 26, 2020 at 8:46:00 AM UTC+2, Massimo Di Pierro wrote:
>>
>> what browser?
>>
>> On Monday, 30 March 2020 13:23:57 UTC-7, Clemens wrote:
>>>
>>> Hello everybody!
>>>
>>> I've switched my web2py app from python2 to python3. The app itself
>>> works fine, but the web2py online debugger doesn't work anymore and is
>>> mostly freezing. Sometimes a get the following error message:
>>>
>>> Exception timeout: timeout('timed out',)
>>>
>>> Traceback (most recent call last): File "/usr/lib/python3.6/socket.py",
>>> line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed
>>> out
>>>
>>> My configuration is as follows:
>>>
>>> web2py 2.19.1-stable+timestamp.2020.03.21.21.49.28 (Running on Rocket
>>> 1.2.6, Python 3.6.9), Ubuntu 18.04 LTS
>>>
>>> What do I have to change additionally that the online debugger is
>>> working under python3?
>>>
>>>
>>> Thanks a lot for any support!
>>>
>>>
>>> Best regards Clemens
>>>
>> --
> 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/ccc32a55-4a15-4f88-9b0f-69326542b6f0%40googlegroups.com
> 
> .
>

-- 
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/CACWMBMNqxCspnOYXk0ryaBC8zL%3D%3DPCGOdBMs5ki5got7gWqBVw%40mail.gmail.com.


[web2py] Re: New web2py version - Bug Plugins (SOLVED)

2020-05-04 Thread Rodrigo Attique
Solved in: 3f2b1fe 


Em sábado, 2 de maio de 2020 11:31:42 UTC-3, Rodrigo Attique escreveu:
>
> Helo, I testing a new web2py version and when I try access the Download 
> Repository Plugins on plugins (admin) the ticket is generate.
>
> [image: bug report.JPG]
>
> [image: bug report.JPG]
>
>
>
> How I report this bug?
>

-- 
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/8256e593-acc3-4cf0-a8db-eab0b13be3c8%40googlegroups.com.


[web2py] Re: web2py online debugger under python3

2020-05-04 Thread Clemens
Hello Massimo,

I hoped the latest web2py version would fix the problem. My current 
configuration is now:
web2py version 2.20.4-stable+timestamp.2020.05.03.05.18.50, Running on 
Rocket 1.2.6, Python 3.6.9, Ubuntu 18.04., Firefox 75.0 (64-bit)

But the online debugger still doesn't work. The debugger doesn't catch the 
breakpoint, set in my code. Instead, after waiting a few minutes I got the 
following new situation:

[image: Screenshot_2020-05-04 interact.png]

[image: Screenshot_2020-05-04 interact-02.png]
Do you have any idea, how I can fix this?

Best regards
Clemens


On Sunday, April 26, 2020 at 8:46:00 AM UTC+2, Massimo Di Pierro wrote:
>
> what browser?
>
> On Monday, 30 March 2020 13:23:57 UTC-7, Clemens wrote:
>>
>> Hello everybody!
>>
>> I've switched my web2py app from python2 to python3. The app itself works 
>> fine, but the web2py online debugger doesn't work anymore and is mostly 
>> freezing. Sometimes a get the following error message:
>>
>> Exception timeout: timeout('timed out',)
>>
>> Traceback (most recent call last): File "/usr/lib/python3.6/socket.py", 
>> line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed 
>> out
>>
>> My configuration is as follows:
>>
>> web2py 2.19.1-stable+timestamp.2020.03.21.21.49.28 (Running on Rocket 
>> 1.2.6, Python 3.6.9), Ubuntu 18.04 LTS
>>
>> What do I have to change additionally that the online debugger is working 
>> under python3?
>>
>>
>> Thanks a lot for any support!
>>
>>
>> Best regards Clemens
>>
>

-- 
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/ccc32a55-4a15-4f88-9b0f-69326542b6f0%40googlegroups.com.


[web2py] Re: New web2py version - Bug Plugins

2020-05-04 Thread Rodrigo Attique
I open a ticket on github
https://github.com/web2py/web2py/issues/2317

Em sábado, 2 de maio de 2020 11:31:42 UTC-3, Rodrigo Attique escreveu:
>
> Helo, I testing a new web2py version and when I try access the Download 
> Repository Plugins on plugins (admin) the ticket is generate.
>
> [image: bug report.JPG]
>
> [image: bug report.JPG]
>
>
>
> How I report this bug?
>

-- 
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/d1d12aac-a109-48d5-bdf4-dae407f91078%40googlegroups.com.


[web2py] How to UPGRADE py4web hosted at https://www.pythonanywhere.com/ ?

2020-05-04 Thread Luc Chase
I have a working version with _documentation?version=0.1.20200210.2

I want to understand how to upgrade.

I've tried entering 

python3 -m pip install --upgrade py4web

from /home/myinstall/


but after a series of successful inI get many errors and there is no sign that 
anything got upgraded...

11:33 ~ $ python3 -m pip install --upgrade py4webCollecting py4webRequirement 
already up-to-date: threadsafevariable in ./.local/lib/python3.6/site-packages 
(from py4web)Collecting pydal (from py4web)Collecting requests (from py4web)  
Using cached 
https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whlCollecting
 yatl (from py4web)Collecting click (from py4web)  Using cached 
https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whlRequirement
 already up-to-date: gunicorn in ./.local/lib/python3.6/site-packages (from 
py4web)Requirement already up-to-date: pluralize in 
./.local/lib/python3.6/site-packages (from py4web)Collecting tornado (from 
py4web)Collecting bottle (from py4web)  Using cached 
https://files.pythonhosted.org/packages/e9/39/2bf3a1fd963e749cdbe5036a184eda8c37d8af25d1297d94b8b7aeec17c4/bottle-0.12.18-py3-none-any.whlCollecting
 gevent (from py4web)Requirement already up-to-date: pyjwt in 
./.local/lib/python3.6/site-packages (from py4web)Collecting certifi>=2017.4.17 
(from requests->py4web)  Using cached 
https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-any.whlCollecting
 urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->py4web)  Using cached 
https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whlCollecting
 idna<3,>=2.5 (from requests->py4web)  Using cached 
https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whlCollecting
 chardet<4,>=3.0.2 (from requests->py4web)  Using cached 
https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whlCollecting
 setuptools>=3.0 (from gunicorn->py4web)  Using cached 
https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whlCollecting
 cffi>=1.12.2 (from gevent->py4web)  Downloading 
https://files.pythonhosted.org/packages/f1/c7/72abda280893609e1ddfff90f8064568bd8bcb2c1770a9d5bb5edb2d1fea/cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl
 (399kB)100% || 399kB 857kB/s Collecting 
greenlet>=0.4.14 (from gevent->py4web)  Using cached 
https://files.pythonhosted.org/packages/bf/45/142141aa47e01a5779f0fa5a53b81f8379ce8f2b1cd13df7d2f1d751ae42/greenlet-0.4.15-cp36-cp36m-manylinux1_x86_64.whlCollecting
 pycparser (from cffi>=1.12.2->gevent->py4web)  Downloading 
https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
 (112kB)100% || 112kB 2.2MB/s Installing 
collected packages: pydal, certifi, urllib3, idna, chardet, requests, yatl, 
click, tornado, bottle, pycparser, cffi, greenlet, gevent, py4web, setuptools  
Found existing installation: pydal 20191227.1Uninstalling pydal-20191227.1: 
 Successfully uninstalled pydal-20191227.1  Rolling back uninstall of 
pydalException:Traceback (most recent call last):  File 
"/usr/local/lib/python3.6/dist-packages/pip/basecommand.py", line 215, in main  
  status = self.run(options, args)  File 
"/usr/local/lib/python3.6/dist-packages/pip/commands/install.py", line 342, in 
runprefix=options.prefix_path,  File 
"/usr/local/lib/python3.6/dist-packages/pip/req/req_set.py", line 784, in 
install**kwargs  File 
"/usr/local/lib/python3.6/dist-packages/pip/req/req_install.py", line 851, in 
installself.move_wheel_files(self.source_dir, root=root, prefix=prefix)  
File "/usr/local/lib/python3.6/dist-packages/pip/req/req_install.py", line 
1064, in move_wheel_filesisolated=self.isolated,  File 
"/usr/local/lib/python3.6/dist-packages/pip/wheel.py", line 345, in 
move_wheel_filesclobber(source, lib_dir, True)  File 
"/usr/local/lib/python3.6/dist-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)  File 
"/usr/local/lib/python3.6/dist-packages/pip/utils/__init__.py", line 83, in 
ensure_diros.makedirs(path)  File "/usr/lib/python3.6/os.py", line 220, in 
makedirsmkdir(name, mode)PermissionError: [Errno 13] Permission denied: 
'/usr/local/lib/python3.6/dist-packages/pydal-20200502.2.dist-info'



Any advice on what I'm doing wrong?



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2