[web2py] Has anybody had experience with Visual Studio Code Remote Development?

2020-08-06 Thread AGRogers
Hi

Has anyone used this sort of config before with web2py? That is, VSC
connecting via SSH to a remote server (Google Cloud Debian VM for me) and
then being able to debug an app on the remote system.

I am getting ready to deploy my app for the first time and have been
somewhat fearful that if there is some weird bug I will never be able to
track it down without being able to debug on that system.

So i stumbled onto this
https://code.visualstudio.com/docs/remote/remote-overview which seems
really cool - you can run python apps on a remote server and debug it like
it was on the localhost.

So i got a Google Cloud server installed and got VSC talking to it fine and
debugged a one line python 'app'. So that was neat.

But I am not sure where to start with web2py in this environment. I havent
tried very hard yet though.

Can anyone tell me i am wasting my time or that it works great?

Thanks
Andrew

-- 
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/CACWMBMNyM8Op2MmusQyCLnE_4BcXtfSN063GFxNFxHdc6Un-EQ%40mail.gmail.com.


Re: [web2py] Re: Sending smses via my web2py

2020-08-06 Thread António Ramos
i use
https://www.easysendsms.com/
very good  and with a good and simple api

Em qui., 6 de ago. de 2020 às 04:10, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> Nice. will integrate with py4web. :-)
>
>
> On Wednesday, 5 August 2020 16:01:18 UTC-7, Jacinto Parga wrote:
>>
>> I use https://www.messagebird.com/
>> It has a well documented api and works well with web2py
>> El miércoles, 5 de agosto de 2020 a las 20:58:51 UTC+2, Massimo Di Pierro
>> escribió:
>>
>>> That list of service providers is very old. I sugget you use twilio
>>>
>>>
>>> On Wednesday, 5 August 2020 02:14:11 UTC-7, mostwanted wrote:


 I am failing to send smses with my app following the book example (
 http://www.web2py.com/books/default/chapter/29/08/emails-and-sms#Emails-and-SMS)
 which i felt was straight forward, is there something extra must include in
 my controller code?

 *MY CODE*
 def send_sms():
 from gluon.contrib.sms_utils import SMSCODES, sms_email
 email = sms_email('+000 (00) 000-000','Orange')
 mail.send(to=email, subject='sms test', message='testing testing
 123')

 Regards

 Mostwanted

>>> --
> 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/5c8f8e5c-9096-4194-aba0-785c8bf07b12o%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/CAEM0BxORkTVkvtYi9yukjkcD9nH%3D7id-8sxdG4%2B58aROP3%2B_Yg%40mail.gmail.com.


[web2py] How to shorten URL name for web2py with multiple controllers

2020-08-06 Thread Warwick JC
Hello.
I only note that this works only for the index page.

routers = dict(
# base router
BASE=dict(
default_application='init',
),
# app specific router
rivelar=dict(
default_controller='default',
default_function='index'
)


)

I would also like to shorten the names for other pages as well, especially 
if you have multiple controllers. How can I dpo this?
Regards

-- 
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/655dae50-cc2e-4442-bd8d-ba1e52235eafo%40googlegroups.com.


[web2py] making url shorter in web2py and google appengine

2020-08-06 Thread Warwick JC
Hello, I followed this 
example
 
on URL shortening.
I wonder how can I do with multiple controllers in the app.
Will the example below be pythonic?

routers = dict(
BASE = dict(
default_application = 'myapp',
default_controller = 'default',
default_function = 'index',
),
BASE = dict(
default_application = 'myapp',
default_controller = 'default2',
default_function = 'page_other',
),
BASE = dict(
default_application = 'myapp',
default_controller = 'default3',
default_function = 'page_others',
),


)

-- 
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/5ca5bbb8-a3ad-4824-bdb0-b69e6949b53ao%40googlegroups.com.


[web2py] Re: Error with FDB in new version of Web2py

2020-08-06 Thread villas
Best way to update is probably just using git.  Read the notes referring to 
pyDAL here:  https://github.com/web2py/web2py

If you want a quick and dirty experiment,  see whether updating the adapter 
file  firebird.py 
 
fixes your issue, (don't forget to restart web2py).

-- 
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/4f176aaa-1fd6-4c34-a7ca-dad5086f62a1o%40googlegroups.com.


[web2py] Re: Error with FDB in new version of Web2py

2020-08-06 Thread Константин Комков
*Villas*, can I update pyDAL myself in web2py or it's suggestion 
for Massimo Di Pierro?)

четверг, 6 августа 2020 г. в 14:25:13 UTC+3, villas: 

> It's a good time to update pyDAL too!
>

-- 
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/3149bde7-d628-4de5-b784-89a74280ee54n%40googlegroups.com.


[web2py] Re: Error with FDB in new version of Web2py

2020-08-06 Thread villas
It's a good time to update pyDAL too!

-- 
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/9fef1b75-2a4f-43b5-b7c0-ae20120af0ceo%40googlegroups.com.


[web2py] Error with FDB in new version of Web2py

2020-08-06 Thread Константин Комков
*Error ticket for "application"*
*Ticket ID*
*127.0.0.1.2020-08-06.08-53-16.232678aa-5c76-4d2f-b740-c3dc5be4668d*

* ('Error while preparing SQL 
statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = 
-104\n- Unexpected end of command - line 1, column 8', -104, 335544569)*
*Версия*
*web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50*
*Python Python 3.7.3: C:\Python\python.exe (prefix: C:\Python)*
*Traceback*
*Traceback (most recent call last):*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\restricted.py", 
line 219, in restricted*
*exec(ccode, environment)*
*  File "C:/Users/kkomkov.TIMACAD/Desktop/web2py 
new/applications/application/controllers/default.py", line 151, in *
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\globals.py", 
line 430, in *
*self._caller = lambda f: f()*
*  File "C:/Users/kkomkov.TIMACAD/Desktop/web2py 
new/applications/application/controllers/default.py", line 6, in index*
*interval = db().select(db.t_admission_schedule.BEGINNING, 
cache=(cache.ram, 60 * 60 * 24), cacheable=True).first()*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\objects.py", line 2634, in select*
*return adapter.select(self.query, fields, attributes)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 877, in select*
*return self._cached_select(cache, sql, fields, attributes, colnames)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 868, in _cached_select*
*key, lambda self=self, args=args: self._select_aux(*args), time_expire*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\cache.py", line 
247, in __call__*
*value = f()*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 868, in *
*key, lambda self=self, args=args: self._select_aux(*args), time_expire*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 835, in _select_aux*
*rows = self._select_aux_execute(sql)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 829, in 
_select_aux_execute*
*self.execute(sql)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\__init__.py", line 65, in wrap*
*if not args[0].connection:*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\connection.py", line 32, in connection*
*return self.get_connection()*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\connection.py", line 66, in get_connection*
*self.set_connection(connection, run_hooks=True)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\connection.py", line 80, in set_connection*
*self.test_connection()*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 425, in 
test_connection*
*self.execute("SELECT 1;")*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\__init__.py", line 69, in wrap*
*return f(*args, **kwargs)*
*  File "C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py", line 461, in execute*
*rv = self.cursor.execute(command, *args[1:], **kwargs)*
*  File "C:\Python\lib\site-packages\fdb\fbcore.py", line 3688, in execute*
*self._ps = PreparedStatement(operation, self, True)*
*  File "C:\Python\lib\site-packages\fdb\fbcore.py", line 2307, in __init__*
*"Error while preparing SQL statement:")*
*fdb.fbcore.DatabaseError: ('Error while preparing SQL statement:\n- 
SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Unexpected 
end of command - line 1, column 8', -104, 335544569)*
*Error snapshot help*
*DatabaseError(('Error while preparing SQL statement:\n- SQLCODE: -104\n- 
Dynamic SQL Error\n- SQL error code = -104\n- Unexpected end of command - 
line 1, column 8', -104, 335544569))*

*inspect attributes*

*Frames*
*File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\restricted.py in 
restricted at line 219 код аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\applications\application\controllers\default.py in  at line 151 
код аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py new\gluon\globals.py in 
 at line 430 код аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\applications\application\controllers\default.py in index at line 6 код 
аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\objects.py in select at line 2634 код 
аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py 
new\gluon\packages\dal\pydal\adapters\base.py in select at line 877 код 
аргументы переменные*

*File C:\Users\kkomkov.TIMACAD\Desktop\web2py