[web2py] is upgrade still experimental ?

2023-11-20 Thread António Ramos
hello is the upgrade button still experimental ?
[image: image.png]



[image: image.png]

Regards
António

-- 
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/CAEM0BxMYCkA4YDtMAy2BU%3Dj8dX9k50JbUSRcfH2gC566cFUMEA%40mail.gmail.com.


[web2py] cibersecurity audit issue about login

2023-11-16 Thread António Ramos
Hello friends, i guess this is a similar issue between web2py and py4web so
im posting to both groups. Sorry if im abusing ...

We had a cibersecurity audit in our web2py app and they found this issue

QUOTE
During
the application audit process, it was possible to identify that the the
company portal does not implement the restriction of
blocking accounts due to invalid login attempts This allows an attacker to
use brute force attacks to attempt a valid credential indefinitely

*Recommendation*
We
recommend implementing account lockout policies for invalid login attempts,
as well as captcha and multi factor
authentication ( mechanisms, as well as session timeouts to log out a user
who has been inactive on the system for
some time
UNQUOTE

I already activated the mfa in my app but it only works if the password is
correct.
An attacker trying to guess the password could have a forever loop trying
to login and it can stress the sever CPU.

Any comments on this ?

Regards
António

-- 
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/CAEM0BxN7fY6Ymy8Fihb7UKWarT%2B9CsuQnH%3D9tYo1JFSFVH%2BgdA%40mail.gmail.com.


Re: [web2py] Re: web2py 2.26.1 released

2023-10-30 Thread António Ramos
I´m so comfortable with web2py, the admin dashboard and the scheduler are
blocking me from moving to py4web...
Regards

Em seg., 30 de out. de 2023 às 04:48, Raul Monares 
escreveu:

> Great news. I appreatiate your work on both platforms
>
> On Sunday, October 29, 2023 at 3:13:31 PM UTC-6 Massimo Di Pierro wrote:
>
>> Changelog:
>> - adds support of python up to version 3.11
>> - fixes a bug with serialization of headers introduced in version 2.25.1
>> - improves handling of unstable db connections in the scheduler
>>
>> I remind you that py4web has been out for 5 years now as successor of
>> web2py.
>> It has the same template language and dal as web2py but it is a lot
>> faster.
>> It has a better grid, form handling, and auth integrations.
>>
>> Massimo
>>
>> --
> 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/22e4071c-f4e6-4b67-b63b-087db6fd2645n%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/CAEM0BxO5q87Ec9AxmPkpjUxpMdA0xcDk0xAjnzdXCMVLgFb5vQ%40mail.gmail.com.


Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread António Ramos
 # (db.auth_user.mfa_override >=
>>>>> datetime.datetime.now())
>>>>> # & (db.auth_user.active == True)
>>>>> # ).select():
>>>>> # db(
>>>>> # (db.auth_membership.group_id == ag.id)
>>>>> # & (db.auth_membership.user_id ==
>>>>> exempt_user.id)
>>>>> # ).delete()
>>>>> # db.commit()
>>>>> #
>>>>> # print(datetime.datetime.now())
>>>>> #
>>>>> # #  set to False to force web2py to check the
>>>>> two_factor_authentication  group
>>>>> # return_value = False
>>>>>
>>>>> That code is in db.py
>>>>>
>>>>> Then
>>>>>
>>>>> auth.settings.auth_two_factor_enabled = lambda user:
>>>>> _two_factor_required(user)
>>>>> auth.messages.two_factor_comment = "QLF MFA - you have been sent a
>>>>> code"
>>>>> auth.settings.two_factor_methods = [
>>>>> lambda user, auth_two_factor: _send_sms(user, auth_two_factor)
>>>>> ]
>>>>>
>>>>> My _send_sms code built and sms and sent it via Twilio or RingCentral
>>>>>
>>>>> I wrote this code, but then we ended up not implementing.  The web2py
>>>>> code is going away for us.  All the same concepts work in py4web (nudge
>>>>> wink wink)
>>>>>
>>>>> -Jim
>>>>>
>>>>>
>>>>>
>>>>> On Friday, September 1, 2023 at 5:24:53 AM UTC-5 Ramos wrote:
>>>>>
>>>>>> Anyone can help me ?
>>>>>>
>>>>>> Em qua., 30 de ago. de 2023 às 10:14, António Ramos <
>>>>>> ramst...@gmail.com> escreveu:
>>>>>>
>>>>>>> in other words, how do i protect the administrator password? it does
>>>>>>> not have a username , just a password. This is scary :)
>>>>>>>
>>>>>>>
>>>>>>> Em ter., 29 de ago. de 2023 às 19:44, António Ramos <
>>>>>>> ramst...@gmail.com> escreveu:
>>>>>>>
>>>>>>>> But that is for everyone, i just want to start with users with
>>>>>>>> admin powers
>>>>>>>>
>>>>>>>> Clemens  escreveu em ter.,
>>>>>>>> 29/08/2023 às 18:25 :
>>>>>>>>
>>>>>>>>> Try enabling 2FA via the following setting, since this is for all
>>>>>>>>> users:
>>>>>>>>> *auth.settings.auth_two_factor_enabled = True*
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> Clemens
>>>>>>>>>
>>>>>>>>> On Tuesday, August 29, 2023 at 6:09:26 PM UTC+2 Ramos wrote:
>>>>>>>>>
>>>>>>>>>> i just activated the two step auth with this
>>>>>>>>>>
>>>>>>>>>> auth.settings.two_factor_authentication_group = "auth2step"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> but now how do i include the administrator user  ?
>>>>>>>>>>
>>>>>>>>>> regards
>>>>>>>>>> António
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 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+un...@googlegroups.com.
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/d/msgid/web2py/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com
>>>>>>>>> <https://groups.google.com/d/msgid/web2py/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com?utm_medium=email_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> --
>>>>> 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+un...@googlegroups.com.
>>>>>
>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/web2py/f92a15ab-45f6-41ae-b285-6b717abd3d7fn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/web2py/f92a15ab-45f6-41ae-b285-6b717abd3d7fn%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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+un...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/c8187486-ebdd-4f18-a4d6-b9a45381fad9n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/web2py/c8187486-ebdd-4f18-a4d6-b9a45381fad9n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/4d5dc6cd-66c9-42d7-ab5d-78f089987d65n%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/4d5dc6cd-66c9-42d7-ab5d-78f089987d65n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAEM0BxMc0gsECyaZToL90-2C9MzuXaL2r_qAAX9scaEX2DrVNw%40mail.gmail.com.


Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread António Ramos
this admin

https://mysite.com/admin

Em sex., 1 de set. de 2023 às 16:08, Jim S  escreveu:

> What does 'administrator password' mean to you?
>
> I'm not sure what you're referring to
>
> -Jim
>
> On Friday, September 1, 2023 at 9:53:43 AM UTC-5 Ramos wrote:
>
>> Hello Jim
>> this line of code
>> *auth.settings.auth_two_factor_enabled = True*
>> *does not protect the administrator password. Only created users.*
>> *That is my question, how to force administrator to use 2fa ?*
>> *regards*
>> *António*
>>
>> Em sex., 1 de set. de 2023 às 15:00, Jim S  escreveu:
>>
>>> Here is the code I wrote that only enforced 2fa for users outside our
>>> local networks.
>>>
>>> There is some commented out code there that additionally allowed me to
>>> specify users in a group so only that group was force to 2fa
>>>
>>> def _two_factor_required(auth_user):
>>> """
>>> check whether we need to enforce MFA on this login
>>>
>>>We enforce MFA only on logins external to our network.
>>>
>>> Returns
>>> ---
>>> bool - enforce MFA
>>> - True means this login requires MFA
>>> - False means we will not enforce MFA for this login
>>> """
>>> import ipaddress
>>>
>>> return False  #  temp use to disable mfa
>>>
>>> if len(request.args) > 0 and request.args[0] == "login":
>>> if auth_user.mfa_override and datetime.datetime.now() <=
>>> auth_user.mfa_override:
>>> #  no mfa required if the user override is set   - we added
>>> a field in auth_user to allow us to override if a user was having trouble
>>> or lost their phone or something
>>> return False
>>>
>>> qlf_networks = [
>>> "9.9.9.9/22",
>>> "9.9.9.0/24",
>>> "9.9.9.101/24",
>>> ]
>>>
>>> ip_list = []
>>> for range in qlf_networks:
>>> ip_list.extend(ipaddress.IPv4Network(unicode(range)))
>>>
>>> if ipaddress.IPv4Address(unicode(request.client)) in ip_list:
>>> #  if the client address is in the local address list, then
>>> do NOT require MFA so set to False
>>> return_value = False
>>>
>>> #  build the MFA Required group members
>>> # if return_value:
>>> # print(datetime.datetime.now())
>>> # ag = db(db.auth_group.role == "MFA Required
>>> (web2py)").select().first()
>>> # if not ag:
>>> # ag = db.auth_group.insert("MFA Required (web2py)")
>>> # for ou in db(
>>> # (db.auth_user.active == True)
>>> # | (
>>> # (db.auth_user.mfa_override == None)
>>> # & (db.auth_user.mfa_override <=
>>> datetime.datetime.now())
>>> # )
>>> # ).select():
>>> # db.auth_membership.update_or_insert(user_id=ou.id,
>>> group_id=ag)
>>> #
>>> # #  clear out any members that are currently exempt from MFA
>>> # if ag:
>>> # for exempt_user in db(
>>> # (db.auth_user.mfa_override >=
>>> datetime.datetime.now())
>>> # & (db.auth_user.active == True)
>>> # ).select():
>>> # db(
>>> # (db.auth_membership.group_id == ag.id)
>>> # & (db.auth_membership.user_id ==
>>> exempt_user.id)
>>> # ).delete()
>>> # db.commit()
>>> #
>>> # print(datetime.datetime.now())
>>> #
>>> # #  set to False to force web2py to check the
>>> two_factor_authentication  group
>>> # return_value = False
>>>
>>> That code is in db.py
>>>
>>> Then
>>>
>>> auth.settings.auth_two_factor_enabled = lambda user:
>>> _two_factor_required(user)
>>> auth.messages.two_factor_comment = "QLF MFA - you have been sent a code"
>>> auth.settings.two_factor_methods = [
>&g

Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread António Ramos
Hello Jim
this line of code
*auth.settings.auth_two_factor_enabled = True*
*does not protect the administrator password. Only created users.*
*That is my question, how to force administrator to use 2fa ?*
*regards*
*António*

Em sex., 1 de set. de 2023 às 15:00, Jim S  escreveu:

> Here is the code I wrote that only enforced 2fa for users outside our
> local networks.
>
> There is some commented out code there that additionally allowed me to
> specify users in a group so only that group was force to 2fa
>
> def _two_factor_required(auth_user):
> """
> check whether we need to enforce MFA on this login
>
>We enforce MFA only on logins external to our network.
>
> Returns
> ---
> bool - enforce MFA
> - True means this login requires MFA
> - False means we will not enforce MFA for this login
> """
> import ipaddress
>
> return False  #  temp use to disable mfa
>
> if len(request.args) > 0 and request.args[0] == "login":
> if auth_user.mfa_override and datetime.datetime.now() <=
> auth_user.mfa_override:
> #  no mfa required if the user override is set   - we added a
> field in auth_user to allow us to override if a user was having trouble or
> lost their phone or something
> return False
>
> qlf_networks = [
> "9.9.9.9/22",
> "9.9.9.0/24",
> "9.9.9.101/24",
> ]
>
> ip_list = []
> for range in qlf_networks:
> ip_list.extend(ipaddress.IPv4Network(unicode(range)))
>
> if ipaddress.IPv4Address(unicode(request.client)) in ip_list:
> #  if the client address is in the local address list, then do
> NOT require MFA so set to False
> return_value = False
>
> #  build the MFA Required group members
> # if return_value:
> # print(datetime.datetime.now())
> # ag = db(db.auth_group.role == "MFA Required
> (web2py)").select().first()
> # if not ag:
> # ag = db.auth_group.insert("MFA Required (web2py)")
> # for ou in db(
> # (db.auth_user.active == True)
> # | (
> # (db.auth_user.mfa_override == None)
> # & (db.auth_user.mfa_override <=
> datetime.datetime.now())
> # )
> # ).select():
> # db.auth_membership.update_or_insert(user_id=ou.id,
> group_id=ag)
> #
> # #  clear out any members that are currently exempt from MFA
> # if ag:
> # for exempt_user in db(
> # (db.auth_user.mfa_override >=
> datetime.datetime.now())
> # & (db.auth_user.active == True)
> # ).select():
> # db(
> # (db.auth_membership.group_id == ag.id)
> # & (db.auth_membership.user_id == exempt_user.id)
> # ).delete()
> # db.commit()
> #
> # print(datetime.datetime.now())
> #
> # #  set to False to force web2py to check the
> two_factor_authentication  group
> # return_value = False
>
> That code is in db.py
>
> Then
>
> auth.settings.auth_two_factor_enabled = lambda user:
> _two_factor_required(user)
> auth.messages.two_factor_comment = "QLF MFA - you have been sent a code"
> auth.settings.two_factor_methods = [
> lambda user, auth_two_factor: _send_sms(user, auth_two_factor)
> ]
>
> My _send_sms code built and sms and sent it via Twilio or RingCentral
>
> I wrote this code, but then we ended up not implementing.  The web2py code
> is going away for us.  All the same concepts work in py4web (nudge wink
> wink)
>
> -Jim
>
>
>
> On Friday, September 1, 2023 at 5:24:53 AM UTC-5 Ramos wrote:
>
>> Anyone can help me ?
>>
>> Em qua., 30 de ago. de 2023 às 10:14, António Ramos 
>> escreveu:
>>
>>> in other words, how do i protect the administrator password? it does not
>>> have a username , just a password. This is scary :)
>>>
>>>
>>> Em ter., 29 de ago. de 2023 às 19:44, António Ramos 
>>> escreveu:
>>>
>>>> But that is for everyone, i just want to start with users with admin
>>>> powers
>>>>
>>>> Clemens  escreveu em ter., 29/08/2023 às
>>>> 18:25 :
>>>>
>>>>> Try enabling 2FA via the following

Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread António Ramos
Anyone can help me ?

Em qua., 30 de ago. de 2023 às 10:14, António Ramos 
escreveu:

> in other words, how do i protect the administrator password? it does not
> have a username , just a password. This is scary :)
>
>
> Em ter., 29 de ago. de 2023 às 19:44, António Ramos 
> escreveu:
>
>> But that is for everyone, i just want to start with users with admin
>> powers
>>
>> Clemens  escreveu em ter., 29/08/2023
>> às 18:25 :
>>
>>> Try enabling 2FA via the following setting, since this is for all users:
>>> *auth.settings.auth_two_factor_enabled = True*
>>>
>>> Regards
>>> Clemens
>>>
>>> On Tuesday, August 29, 2023 at 6:09:26 PM UTC+2 Ramos wrote:
>>>
>>>> i just activated the two step auth with this
>>>>
>>>> auth.settings.two_factor_authentication_group = "auth2step"
>>>>
>>>>
>>>> but now how do i include the administrator user  ?
>>>>
>>>> regards
>>>> António
>>>>
>>> --
>>> 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/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/web2py/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/CAEM0BxPnGmCsiRVSKU8FFfmxpwFfdjb%2BOi-FckKXVEVCq7HWpg%40mail.gmail.com.


Re: [web2py] Re: administrator login with 2fa

2023-08-30 Thread António Ramos
in other words, how do i protect the administrator password? it does not
have a username , just a password. This is scary :)


Em ter., 29 de ago. de 2023 às 19:44, António Ramos 
escreveu:

> But that is for everyone, i just want to start with users with admin
> powers
>
> Clemens  escreveu em ter., 29/08/2023
> às 18:25 :
>
>> Try enabling 2FA via the following setting, since this is for all users:
>> *auth.settings.auth_two_factor_enabled = True*
>>
>> Regards
>> Clemens
>>
>> On Tuesday, August 29, 2023 at 6:09:26 PM UTC+2 Ramos wrote:
>>
>>> i just activated the two step auth with this
>>>
>>> auth.settings.two_factor_authentication_group = "auth2step"
>>>
>>>
>>> but now how do i include the administrator user  ?
>>>
>>> regards
>>> António
>>>
>> --
>> 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/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/5fe99103-1d14-4b91-80eb-194402c08453n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAEM0BxP_Gncp4AUtwB1FVtK-kv2CBpf%2B83yLG2a_dpA%3D8m%2Bf9A%40mail.gmail.com.


Re: [web2py] Re: administrator login with 2fa

2023-08-29 Thread António Ramos
But that is for everyone, i just want to start with users with admin powers

Clemens  escreveu em ter., 29/08/2023 às
18:25 :

> Try enabling 2FA via the following setting, since this is for all users:
> *auth.settings.auth_two_factor_enabled = True*
>
> Regards
> Clemens
>
> On Tuesday, August 29, 2023 at 6:09:26 PM UTC+2 Ramos wrote:
>
>> i just activated the two step auth with this
>>
>> auth.settings.two_factor_authentication_group = "auth2step"
>>
>>
>> but now how do i include the administrator user  ?
>>
>> regards
>> António
>>
> --
> 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/5fe99103-1d14-4b91-80eb-194402c08453n%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/CAEM0BxMe9qqt_4cAhj0HRzC%2BaS6yQ%3DAx3XEksYJGcE%3DFh7wV%3Dg%40mail.gmail.com.


[web2py] administrator login with 2fa

2023-08-29 Thread António Ramos
i just activated the two step auth with this

auth.settings.two_factor_authentication_group = "auth2step"


but now how do i include the administrator user  ?

regards
António

-- 
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/CAEM0BxPw-LG75MdqsR7PrzdF9AXHjWezJj6XC5gE47cctf9Cow%40mail.gmail.com.


[web2py] Model function raises error when called from scheduler and not from controller

2022-11-30 Thread António Ramos
Hello
i have tested a model function script and it works when i call it from a
controller.
Then i need to run it every 10 minutes.
Calling if from admin scheduler task  raises an error because the model
associated with it loads another  python module. It cannot import it.
The question is if the environment is different between a controller and a
scheduler task that could raise this issue.




Regards
António

-- 
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/CAEM0BxP_kLQfV%3DOQcqSx3OwxwD8tVaBH8XD3daNb9c59EbgbCQ%40mail.gmail.com.


[web2py] About images in mail.sent

2022-10-21 Thread António Ramos
Coding like in the manual

mail.send('y...@example.com',
  'Message subject',
  '',
  attachments = mail.Attachment('/path/to/photo.jpg', content_id='photo'))



all the images appear at the bottom of the email as attachments like this (
anexos means attachments!)
[image: image.png]



how do i prevent this because its not nice to see them as attachments
besides the '

regards
António

-- 
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/CAEM0BxP6HdKJ%2B5ZoxACcev2yLh_Qk_KHmsEZDkBWit_%3DRXWYMQ%40mail.gmail.com.


[web2py] how to translate upload button?

2022-06-06 Thread António Ramos
How/where do i translate this?
Regards
[image: image.png]

-- 
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/CAEM0BxP%2Bdyew%2BUsVM0PZQ8UJ%3DgxPRFi_%3D96XqdXiLmvN8-PaBQ%40mail.gmail.com.


[web2py] owasp anyone ?

2022-05-29 Thread António Ramos
Hello all
I read this part of the book about owasp
Security

The Open Web Application Security Project[owasp
] (OWASP) is a free and
open worldwide community focused on improving the security of application
software.

OWASP has listed the top ten security issues that put web applications at
risk. That list is reproduced here, along with a description of how each
issue is addressed by web2py:

   - "Cross Site Scripting (XSS): XSS flaws occur whenever an application
   takes user supplied data and sends it to a web browser without first
   validating or encoding that content. XSS allows attackers to execute
   scripts in the victim's browser which can hijack user sessions, deface web
   sites, possibly introduce worms, etc." *web2py, by default, escapes all
   variables rendered in the view, preventing XSS.*
   - "Injection Flaws: Injection flaws, particularly SQL injection, are
   common in web applications. Injection occurs when user-supplied data is
   sent to an interpreter as part of a command or query. The attacker's
   hostile data tricks the interpreter into executing unintended commands or
   changing data." *web2py includes a Database Abstraction Layer that makes
   SQL injection impossible. Normally, SQL statements are not written by the
   developer. Instead, SQL is generated dynamically by the DAL, ensuring that
   all inserted data is properly escaped.*
   - "Malicious File Execution: Code vulnerable to remote file inclusion
   (RFI) allows attackers to include hostile code and data, resulting in
   devastating attacks, such as total server compromise." *web2py allows
   only exposed functions to be executed, preventing malicious file execution.
   Imported functions are never exposed; only actions are exposed. web2py uses
   a Web-based administration interface which makes it very easy to keep track
   of what is exposed and what is not.*
   - "Insecure Direct Object Reference: A direct object reference occurs
   when a developer exposes a reference to an internal implementation object,
   such as a file, directory, database record, or key, as a URL or form
   parameter. Attackers can manipulate those references to access other
   objects without authorization." *web2py does not expose any internal
   objects; moreover, web2py validates all URLs, thus preventing directory
   traversal attacks. web2py also provides a simple mechanism to create forms
   that automatically validate all input values.*
   - "Cross Site Request Forgery (CSRF): A CSRF attack forces a logged-on
   victim's browser to send a pre-authenticated request to a vulnerable web
   application, which then forces the victim's browser to perform a hostile
   action to the benefit of the attacker. CSRF can be as powerful as the web
   application that it attacks." *web2py prevents CSRF as well as
   accidental double submission of forms by assigning a one-time random token
   to each form. Moreover web2py uses UUID for session cookie.*
   - "Information Leakage and Improper Error Handling: Applications can
   unintentionally leak information about their configuration, internal
   workings, or violate privacy through a variety of application problems.
   Attackers use this weakness to steal sensitive data, or conduct more
   serious attacks." *web2py includes a ticketing system. No error can
   result in code being exposed to the users. All errors are logged and a
   ticket is issued to the user that allows error tracking. But errors and
   source code are accessible only to the administrator.*
   - "Broken Authentication and Session Management: Account credentials and
   session tokens are often not properly protected. Attackers compromise
   passwords, keys, or authentication tokens to assume other users'
   identities." *web2py provides a built-in mechanism for administrator
   authentication, and it manages sessions independently for each application.
   The administrative interface also forces the use of secure session cookies
   when the client is not "localhost". For applications, it includes a
   powerful Role Based Access Control API.*
   - "Insecure Cryptographic Storage: Web applications rarely use
   cryptographic functions properly to protect data and credentials. Attackers
   use weakly protected data to conduct identity theft and other crimes, such
   as credit card fraud." *web2py uses the MD5 or the HMAC+SHA-512 hash
   algorithms to protect stored passwords. Other algorithms are also
   available.*
   - "Insecure Communications: Applications frequently fail to encrypt
   network traffic when it is necessary to protect sensitive
communications." *web2py
   includes the SSL-enabled[ssl
   ] Rocket WSGI server, but
   it can also use Apache or Lighttpd and mod_ssl to provide SSL encryption of
   communications.*
   - "Failure to Restrict URL Access: Frequently an application only
   protects sensitive functionality 

[web2py] simple error on QLFORM.factory

2022-05-12 Thread António Ramos
 Hello
Just trying to teach someone some web2py stuff from the web2py book and i
got stuck at the beginning.
My friend computer returns this error.
The same code in my pc is ok
def first():
form = SQLFORM.factory(Field('visitor_name',
 label='what is your name?',
 requires=IS_NOT_EMPTY()))


any help ?

Regards
Error ticket for "teste" Ticket ID

127.0.0.1.2022-05-12.16-13-34.312f7acc-fcaf-4e3b-baff-b070321e1706
 __init__() got an unexpected keyword argument 'requires'
Versão
web2py™ Version 2.22.3-stable+timestamp.2022.02.15.15.14.38
Python Python 3.8.3rc1:
C:\Users\convidado\AppData\Local\Programs\Python\Python38-32\python.exe
(prefix: C:\Users\convidado\AppData\Local\Programs\Python\Python38-32)
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
  File "C:/web2py/applications/teste/controllers/teste.py"
,
line 47, in 
  File "C:\web2py\gluon\globals.py", line 430, in 
self._caller = lambda f: f()
  File "C:/web2py/applications/teste/controllers/teste.py"
,
line 34, in primeiro
form = SQLFORM.factory(Field('visitor_name',requires=IS_NOT_EMPTY()))
TypeError: __init__() got an unexpected keyword argument 'requires'



>
>

-- 
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/CAEM0BxMfiChe5%2Bb4x8%3DL9S94eEodvTGU4qi-KD94AAFy43%2BS8A%40mail.gmail.com.


[web2py] Re: psycopg2 current transaction is aborted, commands ignored until end of transaction block

2022-04-29 Thread António Ramos
Solved!
apparently tables were not recreated.
All is fine now!!

Regards

Em sex., 29 de abr. de 2022 às 17:40, António Ramos 
escreveu:

> My scheduler  was not running my tasks.
> So i deleted scheduler tables from postgres and deletes files from
> databases/
>
> I restarted my app and refreshed appadmin. All files and tables were
> recreated.
> However going in appadmin to
> db.scheduler_task
> i get this error
> Error ticket for "fileit"Ticket ID
>
> 194.65.91.147.2022-04-29.16-40-06.d2cd4be0-a64e-4396-af80-c3c76f6bdbed
>  current transaction is
> aborted, commands ignored until end of transaction blockVersion
> web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
> Python Python 3.6.8: /home/ramos/apps/fileit/env/bin/uwsgi (prefix:
> /home/ramos/apps/fileit/env)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
> 21.
> 22.
> 23.
> 24.
> 25.
> 26.
> 27.
> 28.
> 29.
> 30.
> 31.
>
> Traceback (most recent call last):
>   File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 590, in 
> has_membership
> group_id = int(group_id)
> ValueError: invalid literal for int() with base 10: 'Admin'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219, in 
> restricted
> exec(ccode, environment)
>   File 
> "/home/ramos/apps/fileit/web2py/applications/fileit/views/appadmin.html" 
> <https://portal.cires.pt/admin/edit/fileit/views/appadmin.html>, line 154, in 
> 
> {{else:}}
>   File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 592, in 
> has_membership
> group_id = self.id_group(group_id)  # interpret group_id as a role
>   File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 454, in 
> id_group
> rows = self.db(self.table_group().role == role).select()
>   File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/objects.py", 
> line 2634, in select
> return adapter.select(self.query, fields, attributes)
>   File 
> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 878, in select
> return self._select_aux(sql, fields, attributes, colnames)
>   File 
> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 835, in _select_aux
> rows = self._select_aux_execute(sql)
>   File 
> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 829, in _select_aux_execute
> self.execute(sql)
>   File 
> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
>  line 69, in wrap
> return f(*args, **kwargs)
>   File 
> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 461, in execute
> rv = self.cursor.execute(command, *args[1:], **kwargs)
> psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, 
> commands ignored until end of transaction block
>
> Any help please ?
>
> Regards
> António
>
>

-- 
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/CAEM0BxO_WUo5ej6z7E9GYL15sV-AVms6ossei8ktCcwe0cX9fw%40mail.gmail.com.


[web2py] psycopg2 current transaction is aborted, commands ignored until end of transaction block

2022-04-29 Thread António Ramos
My scheduler  was not running my tasks.
So i deleted scheduler tables from postgres and deletes files from
databases/

I restarted my app and refreshed appadmin. All files and tables were
recreated.
However going in appadmin to
db.scheduler_task
i get this error
Error ticket for "fileit"Ticket ID

194.65.91.147.2022-04-29.16-40-06.d2cd4be0-a64e-4396-af80-c3c76f6bdbed
 current transaction is
aborted, commands ignored until end of transaction blockVersion
web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
Python Python 3.6.8: /home/ramos/apps/fileit/env/bin/uwsgi (prefix:
/home/ramos/apps/fileit/env)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 590, in
has_membership
group_id = int(group_id)
ValueError: invalid literal for int() with base 10: 'Admin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219,
in restricted
exec(ccode, environment)
  File "/home/ramos/apps/fileit/web2py/applications/fileit/views/appadmin.html"
, line
154, in 
{{else:}}
  File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 592, in
has_membership
group_id = self.id_group(group_id)  # interpret group_id as a role
  File "/home/ramos/apps/fileit/web2py/gluon/authapi.py", line 454, in id_group
rows = self.db(self.table_group().role == role).select()
  File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/objects.py",
line 2634, in select
return adapter.select(self.query, fields, attributes)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 878, in select
return self._select_aux(sql, fields, attributes, colnames)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 835, in _select_aux
rows = self._select_aux_execute(sql)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 829, in _select_aux_execute
self.execute(sql)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
line 69, in wrap
return f(*args, **kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 461, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
psycopg2.errors.InFailedSqlTransaction: current transaction is
aborted, commands ignored until end of transaction block

Any help please ?

Regards
António

-- 
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/CAEM0BxPBkmjk9vhoLLEyaPoqR%3DN7BfrmT9bTi5VwAL4VCfB6ng%40mail.gmail.com.


[web2py] Scheduler stopping for some reason

2022-04-29 Thread António Ramos
Hello i user scheduler and it was working like a charm
this is my code in a module

scheduler=current.scheduler
scheduler.queue_task(self.callPager, pvars=dict(pager=11,
local=''))

i see the tasks in db.scheduler_task

but they are QUEUED and dont complete.
I see that my python process is still woking in memory
[image: image.png]

my db.scheduler_run table is empty.

this is my worker

[image: image.png]
What could it be the problem ???

regards
António

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


[web2py] starred expression with tuple or array !? differente behaviour!

2022-04-18 Thread António Ramos
Hello i have my code to generate html base on a condition

one of the table columns should be created only if var =1

this works but the html removes the _class="aa" in case of var==1, and does
not create the TD if var!=1
TD(
...,
*(DIV("b",_class="aa") ) if var==1 else tuple())
,
etc


*Using a list*
If i use a list it shows the _class="aa" in case of var==1 but how do i
make it to ommit the column in case var!=1 ??
It creates a blank TD() and that is not what i want
TD(*[DIV("b",_class="aa") if var==1 else None???])

regards
António

-- 
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/CAEM0BxMf7hOSBBG_ptYxYcVSe-r53QZmqm1N6cV6OU7inmp_Lw%40mail.gmail.com.


[web2py] Best way to have form submit disabled until file selected

2022-04-10 Thread António Ramos
Hello i have a form with a file to upload.
What is the best web2py way to have the submit button disabled until the
user selects a file  to upload?
Regards
António

-- 
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/CAEM0BxNSqWNN-aOA%2BhnfQQV5vbCHezsGBb40xVTPzuMiM67PSw%40mail.gmail.com.


[web2py] automate your workflow with gulp...

2022-02-04 Thread António Ramos
sharing my proof of concept 8 years ago.
https://github.com/ramstein74/Coffee_Jade_Stylus_inside_web2py

Regards
António

-- 
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/CAEM0BxM-o%3DC%3D4An812kGy_-HOLwU1CpJcMOv8tveungUovsDkQ%40mail.gmail.com.


[web2py] update_or_insert on an existing record returns None

2021-09-24 Thread António Ramos
Why update_or_insert on an existing record returns None ??
If the record does not exist it returns the created record id but if
updating an existing record i get None.

Regards
António

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


Re: [web2py] python developer survey

2021-03-05 Thread António Ramos
No responses from Portugal? Fake report :)
Pydal should be there also :)


Em qui., 4 de mar. de 2021 às 17:59, Jim S  escreveu:

> I just saw this today.  web2py is #5 in web frameworks.
>
> https://www.jetbrains.com/lp/python-developers-survey-2020/
>
> --
> 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/9314328a-4c5e-4517-9bb9-5e9c18b84d93n%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/CAEM0BxOQa1J9fYagtCBcTzaKo5taF0Yh84yoRQsCuQU56pXBSg%40mail.gmail.com.


Re: [web2py] Re: auth.signature not working

2021-02-15 Thread António Ramos
I didnt because the problem was not in that table.
I was looking to the wrong table.
Thk u

Kevin Keller  escreveu em seg., 15/02/2021 às 18:58 :

> How did you solve it?
>
> On Mon, Feb 15, 2021, 17:33 António Ramos  wrote:
>
>> Thank you Jim but i found the problem.
>> My fault this time.
>> Thank you again.
>>
>> PS. Its just me or this forum is abandoned? Should i go elsewhere for
>> help ?
>>
>> Em seg., 15 de fev. de 2021 às 15:46, António Ramos 
>> escreveu:
>>
>>> Hi Jim
>>> Sorry but dont understand your suggestion.
>>> You mean auth.requires_login() on my restful function like this
>>> @auth.requires_login() ?
>>> @request.restful()
>>> def uploadInvoice():
>>> Does it make sense? Its going to be called by external script.
>>> Inside my  uploadInvoice i have
>>> user = auth.login_bare("myuser", "pwd") and i can check that it returns
>>> the myuser ID. so before inserting a record it should know who the user is.
>>>
>>> I also have this code that i suspect that could get auth.signature in
>>> trouble.
>>> Please comment .
>>>
>>>
>>> db.entities._after_update.append(lambda s, f
>>> : wfFields().update_readers(db, 'entities', s, f))
>>> db.entities._after_update.append(lambda s, f
>>> : wfFields().update_authors(db, 'entities', s, f))
>>> db.entities._after_update.append(lambda s, f: extrafields_sync(s, f))
>>> db.entities._after_insert.append(lambda f, id: extrafields_sync(db(
>>> db.entities.id==id), f))
>>>
>>> Em seg., 15 de fev. de 2021 às 15:33, Jim S 
>>> escreveu:
>>>
>>>> Have you tried with an auth decorator?  Maybe auth.requires_login()?
>>>>
>>>> -Jim
>>>>
>>>> On Saturday, February 13, 2021 at 3:33:01 PM UTC-6 Ramos wrote:
>>>>
>>>>> Anybody here?
>>>>>
>>>>> Em sex., 12 de fev. de 2021 às 23:57, António Ramos <
>>>>> ramst...@gmail.com> escreveu:
>>>>>
>>>>>> hello this is my model
>>>>>> db.define_table(
>>>>>> 'entities',
>>>>>> Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
>>>>>> Field('entity', 'string',length=70,required=True, label=T(
>>>>>> "Entity")),
>>>>>> Field('description', length=100,label=T("Description"), default=
>>>>>> ""),
>>>>>> Field('status', db.status),
>>>>>> Field('type', 'reference dbentities', label=T("Type")),
>>>>>> Field('sub_type', "reference subtypes", label=T("Type")),
>>>>>> Field('event','string',length=10),
>>>>>> Field('trailevent', 'list:integer'),
>>>>>> Field("last_error", default=""),
>>>>>> Field('extrareaders', 'list:reference auth_user'),
>>>>>> Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
>>>>>> IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
>>>>>> Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
>>>>>> IS_IN_DB(db, 'entities.id', '%(entity)s'))),
>>>>>> Field('file', 'upload', label="Ficheiro"),
>>>>>> Field('valstart', 'date', label="Válido de",
>>>>>>   default=datetime.datetime.utcnow()),
>>>>>> Field('valend', 'date', label="Válido até",
>>>>>>   default=datetime.datetime.utcnow()),
>>>>>> Field('orderedat', 'float'),
>>>>>> Field('question','string'),
>>>>>> Field('qt','double'),
>>>>>> Field('units','string',length=5),
>>>>>> Field('readers', 'list:string', default=[""]),#friend uuid
>>>>>> Field('details','json'),
>>>>>> auth.signature,
>>>>>> format='%(type)s %(entity)s',
>>>>>> )
>>>>>>
>>>>>>
>>>>>> I have auth.signature but  this code
>>>>>>
>>>>>> @request.restful()
>>>>>> def uploadInvoice():
>>>>>> import random
>>>>>> import string
>>>>>> response.view = 'generic.json'
>>>>>>
>&

Re: [web2py] Re: auth.signature not working

2021-02-15 Thread António Ramos
Once again thank you Jim for your patience :)
Regards from Portugal

António

Em seg., 15 de fev. de 2021 às 16:59, Jim S  escreveu:

> No, this forum has not been abandoned.  I think the issue may be that most
> of us are now spending a much greater amount of time with py4web.  That,
> and in my case anyway, I shied away from this question because I haven't
> used web2py in a restful manner before so wasn't sure I had anything to
> offer.
>
> -Jim
>
> On Monday, February 15, 2021 at 10:33:12 AM UTC-6 Ramos wrote:
>
>> Thank you Jim but i found the problem.
>> My fault this time.
>> Thank you again.
>>
>> PS. Its just me or this forum is abandoned? Should i go elsewhere for
>> help ?
>>
>> Em seg., 15 de fev. de 2021 às 15:46, António Ramos 
>> escreveu:
>>
>>> Hi Jim
>>> Sorry but dont understand your suggestion.
>>> You mean auth.requires_login() on my restful function like this
>>> @auth.requires_login() ?
>>> @request.restful()
>>> def uploadInvoice():
>>> Does it make sense? Its going to be called by external script.
>>> Inside my  uploadInvoice i have
>>> user = auth.login_bare("myuser", "pwd") and i can check that it returns
>>> the myuser ID. so before inserting a record it should know who the user is.
>>>
>>> I also have this code that i suspect that could get auth.signature in
>>> trouble.
>>> Please comment .
>>>
>>>
>>> db.entities._after_update.append(lambda s, f
>>> : wfFields().update_readers(db, 'entities', s, f))
>>> db.entities._after_update.append(lambda s, f
>>> : wfFields().update_authors(db, 'entities', s, f))
>>> db.entities._after_update.append(lambda s, f: extrafields_sync(s, f))
>>> db.entities._after_insert.append(lambda f, id: extrafields_sync(db(
>>> db.entities.id==id), f))
>>>
>>> Em seg., 15 de fev. de 2021 às 15:33, Jim S 
>>> escreveu:
>>>
>>>> Have you tried with an auth decorator?  Maybe auth.requires_login()?
>>>>
>>>> -Jim
>>>>
>>>> On Saturday, February 13, 2021 at 3:33:01 PM UTC-6 Ramos wrote:
>>>>
>>>>> Anybody here?
>>>>>
>>>>> Em sex., 12 de fev. de 2021 às 23:57, António Ramos <
>>>>> ramst...@gmail.com> escreveu:
>>>>>
>>>>>> hello this is my model
>>>>>> db.define_table(
>>>>>> 'entities',
>>>>>> Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
>>>>>> Field('entity', 'string',length=70,required=True, label=T(
>>>>>> "Entity")),
>>>>>> Field('description', length=100,label=T("Description"), default=
>>>>>> ""),
>>>>>> Field('status', db.status),
>>>>>> Field('type', 'reference dbentities', label=T("Type")),
>>>>>> Field('sub_type', "reference subtypes", label=T("Type")),
>>>>>> Field('event','string',length=10),
>>>>>> Field('trailevent', 'list:integer'),
>>>>>> Field("last_error", default=""),
>>>>>> Field('extrareaders', 'list:reference auth_user'),
>>>>>> Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
>>>>>> IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
>>>>>> Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
>>>>>> IS_IN_DB(db, 'entities.id', '%(entity)s'))),
>>>>>> Field('file', 'upload', label="Ficheiro"),
>>>>>> Field('valstart', 'date', label="Válido de",
>>>>>>   default=datetime.datetime.utcnow()),
>>>>>> Field('valend', 'date', label="Válido até",
>>>>>>   default=datetime.datetime.utcnow()),
>>>>>> Field('orderedat', 'float'),
>>>>>> Field('question','string'),
>>>>>> Field('qt','double'),
>>>>>> Field('units','string',length=5),
>>>>>> Field('readers', 'list:string', default=[""]),#friend uuid
>>>>>> Field('details','json'),
>>>>>> auth.signature,
>>>>>> format='%(type)s %(entity)s',
>>>>>> )
>>>>>>
>>>>>>
>>>>>> I have auth

Re: [web2py] Re: auth.signature not working

2021-02-15 Thread António Ramos
Thank you Jim but i found the problem.
My fault this time.
Thank you again.

PS. Its just me or this forum is abandoned? Should i go elsewhere for help ?

Em seg., 15 de fev. de 2021 às 15:46, António Ramos 
escreveu:

> Hi Jim
> Sorry but dont understand your suggestion.
> You mean auth.requires_login() on my restful function like this
> @auth.requires_login() ?
> @request.restful()
> def uploadInvoice():
> Does it make sense? Its going to be called by external script.
> Inside my  uploadInvoice i have
> user = auth.login_bare("myuser", "pwd") and i can check that it returns
> the myuser ID. so before inserting a record it should know who the user is.
>
> I also have this code that i suspect that could get auth.signature in
> trouble.
> Please comment .
>
>
> db.entities._after_update.append(lambda s, f
> : wfFields().update_readers(db, 'entities', s, f))
> db.entities._after_update.append(lambda s, f
> : wfFields().update_authors(db, 'entities', s, f))
> db.entities._after_update.append(lambda s, f: extrafields_sync(s, f))
> db.entities._after_insert.append(lambda f, id: extrafields_sync(db(
> db.entities.id==id), f))
>
> Em seg., 15 de fev. de 2021 às 15:33, Jim S 
> escreveu:
>
>> Have you tried with an auth decorator?  Maybe auth.requires_login()?
>>
>> -Jim
>>
>> On Saturday, February 13, 2021 at 3:33:01 PM UTC-6 Ramos wrote:
>>
>>> Anybody here?
>>>
>>> Em sex., 12 de fev. de 2021 às 23:57, António Ramos 
>>> escreveu:
>>>
>>>> hello this is my model
>>>> db.define_table(
>>>> 'entities',
>>>> Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
>>>> Field('entity', 'string',length=70,required=True, label=T("Entity"
>>>> )),
>>>> Field('description', length=100,label=T("Description"), default=""
>>>> ),
>>>> Field('status', db.status),
>>>> Field('type', 'reference dbentities', label=T("Type")),
>>>> Field('sub_type', "reference subtypes", label=T("Type")),
>>>> Field('event','string',length=10),
>>>> Field('trailevent', 'list:integer'),
>>>> Field("last_error", default=""),
>>>> Field('extrareaders', 'list:reference auth_user'),
>>>> Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
>>>> IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
>>>> Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
>>>> IS_IN_DB(db, 'entities.id', '%(entity)s'))),
>>>> Field('file', 'upload', label="Ficheiro"),
>>>> Field('valstart', 'date', label="Válido de",
>>>>   default=datetime.datetime.utcnow()),
>>>> Field('valend', 'date', label="Válido até",
>>>>   default=datetime.datetime.utcnow()),
>>>> Field('orderedat', 'float'),
>>>> Field('question','string'),
>>>> Field('qt','double'),
>>>> Field('units','string',length=5),
>>>> Field('readers', 'list:string', default=[""]),#friend uuid
>>>> Field('details','json'),
>>>> auth.signature,
>>>> format='%(type)s %(entity)s',
>>>> )
>>>>
>>>>
>>>> I have auth.signature but  this code
>>>>
>>>> @request.restful()
>>>> def uploadInvoice():
>>>> import random
>>>> import string
>>>> response.view = 'generic.json'
>>>>
>>>> def POST(*args, **kw):
>>>> try:
>>>> user = auth.login_bare("userxxx", "") # so it has a
>>>> user
>>>> uploaded_file = kw['file']
>>>> filename =
>>>>  db.entities.file.store(uploaded_file, uploaded_file.filename)
>>>> id = db.entities.insert(
>>>> entity="Invoice",
>>>> type=db.dbentities(entity="Invoice")["id"],
>>>> status=DBTools().setStatus(db,"Draft", "Invoice"),
>>>> file=filename,
>>>> created_by=4, # even with this line it saves as None
>>>> modified_by=4, # even with this line it saves as None
>>>> description="")
>>>> if

Re: [web2py] Re: auth.signature not working

2021-02-15 Thread António Ramos
Hi Jim
Sorry but dont understand your suggestion.
You mean auth.requires_login() on my restful function like this
@auth.requires_login() ?
@request.restful()
def uploadInvoice():
Does it make sense? Its going to be called by external script.
Inside my  uploadInvoice i have
user = auth.login_bare("myuser", "pwd") and i can check that it returns the
myuser ID. so before inserting a record it should know who the user is.

I also have this code that i suspect that could get auth.signature in
trouble.
Please comment .


db.entities._after_update.append(lambda s, f: wfFields().update_readers(db,
'entities', s, f))
db.entities._after_update.append(lambda s, f: wfFields().update_authors(db,
'entities', s, f))
db.entities._after_update.append(lambda s, f: extrafields_sync(s, f))
db.entities._after_insert.append(lambda f, id: extrafields_sync(db(
db.entities.id==id), f))

Em seg., 15 de fev. de 2021 às 15:33, Jim S  escreveu:

> Have you tried with an auth decorator?  Maybe auth.requires_login()?
>
> -Jim
>
> On Saturday, February 13, 2021 at 3:33:01 PM UTC-6 Ramos wrote:
>
>> Anybody here?
>>
>> Em sex., 12 de fev. de 2021 às 23:57, António Ramos 
>> escreveu:
>>
>>> hello this is my model
>>> db.define_table(
>>> 'entities',
>>> Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
>>> Field('entity', 'string',length=70,required=True, label=T("Entity"
>>> )),
>>> Field('description', length=100,label=T("Description"), default=""),
>>> Field('status', db.status),
>>> Field('type', 'reference dbentities', label=T("Type")),
>>> Field('sub_type', "reference subtypes", label=T("Type")),
>>> Field('event','string',length=10),
>>> Field('trailevent', 'list:integer'),
>>> Field("last_error", default=""),
>>> Field('extrareaders', 'list:reference auth_user'),
>>> Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
>>> IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
>>> Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
>>> IS_IN_DB(db, 'entities.id', '%(entity)s'))),
>>> Field('file', 'upload', label="Ficheiro"),
>>> Field('valstart', 'date', label="Válido de",
>>>   default=datetime.datetime.utcnow()),
>>> Field('valend', 'date', label="Válido até",
>>>   default=datetime.datetime.utcnow()),
>>> Field('orderedat', 'float'),
>>> Field('question','string'),
>>> Field('qt','double'),
>>> Field('units','string',length=5),
>>> Field('readers', 'list:string', default=[""]),#friend uuid
>>> Field('details','json'),
>>> auth.signature,
>>> format='%(type)s %(entity)s',
>>> )
>>>
>>>
>>> I have auth.signature but  this code
>>>
>>> @request.restful()
>>> def uploadInvoice():
>>> import random
>>> import string
>>> response.view = 'generic.json'
>>>
>>> def POST(*args, **kw):
>>> try:
>>> user = auth.login_bare("userxxx", "") # so it has a user
>>> uploaded_file = kw['file']
>>> filename =
>>>  db.entities.file.store(uploaded_file, uploaded_file.filename)
>>> id = db.entities.insert(
>>> entity="Invoice",
>>> type=db.dbentities(entity="Invoice")["id"],
>>> status=DBTools().setStatus(db,"Draft", "Invoice"),
>>> file=filename,
>>> created_by=4, # even with this line it saves as None
>>> modified_by=4, # even with this line it saves as None
>>> description="")
>>> if id:
>>> eventid = db.events.insert(
>>> event="Invoice", relatedto=id,  type=
>>> "Document added", receipts={},linktodoc=id
>>> )
>>> db.entities[id]=dict(event=eventid)
>>> return "ok"
>>>
>>> except Exception as e:
>>> raise Exception('Error on line {}{}{}'.format(
>>> sys.exc_info()[-1].tb_lineno, str(e), request.vars))
>>> return locals()
>>>
>>> does not fills the cr

[web2py] Re: auth.signature not working

2021-02-13 Thread António Ramos
Anybody here?

Em sex., 12 de fev. de 2021 às 23:57, António Ramos 
escreveu:

> hello this is my model
> db.define_table(
> 'entities',
> Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
> Field('entity', 'string',length=70,required=True, label=T("Entity")),
> Field('description', length=100,label=T("Description"), default=""),
> Field('status', db.status),
> Field('type', 'reference dbentities', label=T("Type")),
> Field('sub_type', "reference subtypes", label=T("Type")),
> Field('event','string',length=10),
> Field('trailevent', 'list:integer'),
> Field("last_error", default=""),
> Field('extrareaders', 'list:reference auth_user'),
> Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
> IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
> Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
> IS_IN_DB(db, 'entities.id', '%(entity)s'))),
> Field('file', 'upload', label="Ficheiro"),
> Field('valstart', 'date', label="Válido de",
>   default=datetime.datetime.utcnow()),
> Field('valend', 'date', label="Válido até",
>   default=datetime.datetime.utcnow()),
> Field('orderedat', 'float'),
> Field('question','string'),
> Field('qt','double'),
> Field('units','string',length=5),
> Field('readers', 'list:string', default=[""]),#friend uuid
> Field('details','json'),
> auth.signature,
> format='%(type)s %(entity)s',
> )
>
>
> I have auth.signature but  this code
>
> @request.restful()
> def uploadInvoice():
> import random
> import string
> response.view = 'generic.json'
>
> def POST(*args, **kw):
> try:
> user = auth.login_bare("userxxx", "") # so it has a user
> uploaded_file = kw['file']
> filename =
>  db.entities.file.store(uploaded_file, uploaded_file.filename)
> id = db.entities.insert(
> entity="Invoice",
> type=db.dbentities(entity="Invoice")["id"],
> status=DBTools().setStatus(db,"Draft", "Invoice"),
> file=filename,
> created_by=4, # even with this line it saves as None
> modified_by=4, # even with this line it saves as None
> description="")
> if id:
> eventid = db.events.insert(
> event="Invoice", relatedto=id,  type="Document added"
> , receipts={},linktodoc=id
> )
> db.entities[id]=dict(event=eventid)
> return "ok"
>
> except Exception as e:
> raise Exception('Error on line {}{}{}'.format(
> sys.exc_info()[-1].tb_lineno, str(e), request.vars))
> return locals()
>
> does not fills the created_by and modified_by field. They have None
>
> Any help ???
> 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/CAEM0BxOSgu28pNs%2Be5QHXCa59bwdZ0G7xSSaxYDiHmf37w_AKw%40mail.gmail.com.


[web2py] auth.signature not working

2021-02-12 Thread António Ramos
hello this is my model
db.define_table(
'entities',
Field('uuid', length=64, default=lambda: str(uuid.uuid4())),
Field('entity', 'string',length=70,required=True, label=T("Entity")),
Field('description', length=100,label=T("Description"), default=""),
Field('status', db.status),
Field('type', 'reference dbentities', label=T("Type")),
Field('sub_type', "reference subtypes", label=T("Type")),
Field('event','string',length=10),
Field('trailevent', 'list:integer'),
Field("last_error", default=""),
Field('extrareaders', 'list:reference auth_user'),
Field('extrafield', db.extrafields, requires=IS_EMPTY_OR(
IS_IN_DB(db, 'extrafields.id', '%(extrafield)s'))),
Field('relatedto', 'reference entities', requires=IS_EMPTY_OR(
IS_IN_DB(db, 'entities.id', '%(entity)s'))),
Field('file', 'upload', label="Ficheiro"),
Field('valstart', 'date', label="Válido de",
  default=datetime.datetime.utcnow()),
Field('valend', 'date', label="Válido até",
  default=datetime.datetime.utcnow()),
Field('orderedat', 'float'),
Field('question','string'),
Field('qt','double'),
Field('units','string',length=5),
Field('readers', 'list:string', default=[""]),#friend uuid
Field('details','json'),
auth.signature,
format='%(type)s %(entity)s',
)


I have auth.signature but  this code

@request.restful()
def uploadInvoice():
import random
import string
response.view = 'generic.json'

def POST(*args, **kw):
try:
user = auth.login_bare("userxxx", "") # so it has a user
uploaded_file = kw['file']
filename =
 db.entities.file.store(uploaded_file, uploaded_file.filename)
id = db.entities.insert(
entity="Invoice",
type=db.dbentities(entity="Invoice")["id"],
status=DBTools().setStatus(db,"Draft", "Invoice"),
file=filename,
created_by=4, # even with this line it saves as None
modified_by=4, # even with this line it saves as None
description="")
if id:
eventid = db.events.insert(
event="Invoice", relatedto=id,  type="Document added",
receipts={},linktodoc=id
)
db.entities[id]=dict(event=eventid)
return "ok"

except Exception as e:
raise Exception('Error on line {}{}{}'.format(
sys.exc_info()[-1].tb_lineno, str(e), request.vars))
return locals()

does not fills the created_by and modified_by field. They have None

Any help ???
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/CAEM0BxORXNPK5%3DfkUsCsoqccqnC1RCJ-xNwSu4N%2BwwR5JYEuaQ%40mail.gmail.com.


Re: [web2py] Re: can i delete sql.log?

2021-02-11 Thread António Ramos
Thank u

Em qua., 10 de fev. de 2021 às 23:38, cdbaron 
escreveu:

> Sql.log is an informative file, if you delete it, it will be created again. It
> does not affect the operation of the applications. In this file, SQL
> queries of the DB migrations are stored.
>
> El martes, 9 de febrero de 2021 a las 23:34:06 UTC+1, Ramos escribió:
>
>> can i delete sql.log?
>>
> --
> 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/26ad2f8d-2467-4540-a5ab-61007cd6ea97n%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/CAEM0BxNJ-t4TOfCRwY54B0_aMMBbYV-buwmxYRcH6BJsYwQzBw%40mail.gmail.com.


Re: [web2py] Re: fake_migration issues

2021-02-10 Thread António Ramos
I have started another post with apparently the same problem.
as i have a production app i cant wait much longer so if anyone can help me
professionaly with this please contact me privately.
Regards

Em dom., 31 de jan. de 2021 às 23:58, Dave S 
escreveu:

> On Saturday, January 30, 2021 at 3:32:13 PM UTC-8 valq...@gmail.com wrote:
>
>> try to compare db.py from  "fresh" welcome-app with your app. I have had
>> a migration problem due to imports changes
>>
>>
> Thanks!  This wasn't the issue, but you got me looking in the right place
> ... I had missed migrate_enabled.
>
> There's some followup details for when I have time at the keyboard.
>
> Dave S
> /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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/f45054c1-5233-4106-a85b-25556b2e9255n%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/CAEM0BxMxFd7W1t-qG4Hj2-jJ%3D8GKsKUq7FYOan6%3DEUYcMp%3DwTA%40mail.gmail.com.


[web2py] can i delete sql.log?

2021-02-09 Thread António Ramos
can i delete sql.log?

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


[web2py] can broken migration cause current transaction is aborted by pg?

2021-02-09 Thread António Ramos
i´m getting this error editing new tables in appadmin.
Does it have to to with broken migrations?
how to solve this?

regards
António

 current transaction is
aborted, commands ignored until end of transaction blockVersão
web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
Python Python 3.6.8: /home/ramos/apps/fileit/env/bin/uwsgi (prefix:
/home/ramos/apps/fileit/env)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219,
in restricted
exec(ccode, environment)
  File "/home/ramos/apps/fileit/web2py/applications/fileit/views/appadmin.html"
, line
85, in 
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
  File "/home/ramos/apps/fileit/web2py/applications/fileit/models/tools.py"
, line 23,
in myFriends
).select(db.dbentities.id).as_list()
  File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/objects.py",
line 2634, in select
return adapter.select(self.query, fields, attributes)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 878, in select
return self._select_aux(sql, fields, attributes, colnames)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 835, in _select_aux
rows = self._select_aux_execute(sql)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 829, in _select_aux_execute
self.execute(sql)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
line 69, in wrap
return f(*args, **kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 461, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
psycopg2.errors.InFailedSqlTransaction: current transaction is
aborted, commands ignored until end of transaction block

-- 
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/CAEM0BxPAY5H0-4%2BYaUVnOzCY1qKz4o72NqoVDWCM5kgDEYxYAQ%40mail.gmail.com.


[web2py] Re: URgent No module named applications.empre.modules.requests

2021-01-07 Thread António Ramos
solved.
had to kill processes because stop didnt do it
Then start solved the import error


Em qui., 7 de jan. de 2021 às 10:28, António Ramos 
escreveu:

> Hello today my web2py does not start with the error
>
> No module named applications.empre.modules.requests??
>
> requests is inside site-packages.
>
> I have python3.6 in opalstack
>
> What can I do?
>
>
> 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/CAEM0BxNvEBdAYkMn%3DrDMC%3DP1m23GZce9jmaaTobypC606tSocA%40mail.gmail.com.


[web2py] URgent No module named applications.empre.modules.requests

2021-01-07 Thread António Ramos
Hello today my web2py does not start with the error

No module named applications.empre.modules.requests??

requests is inside site-packages.

I have python3.6 in opalstack

What can I do?


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/CAEM0BxMb6Xk6v3v4kZpC6%2BTChrJPiY3fPo%2B6s%3DQVEDYgHBJSvQ%40mail.gmail.com.


Re: [web2py] Re: Push Notifications

2020-11-20 Thread António Ramos
Yes you make an app in web2py that subscribes to one or many pusher
notification channels. That channels are created by you in your html of
your web2py app.
 your web2py server sends notifications to pusher.com using python code
,and your webpages subscribes the same notifications using javascript. you
can go crazy and create rooms etc.
The docs from pusher are very informative.
Regards
António

Em sex., 20 de nov. de 2020 às 18:28, Christian Varas <
chriiisti...@gmail.com> escreveu:

> Hi! I need to implement this and receive the notifications in the phone
> android/iOS. For this do I need to make my own app? Or do you use an app
> who can subscribe to push notifications in pusher.com ?
> This is off topic but any recommendation is appreciated
>
> Cheers.
> Chris
>
> El El vie, 20 de nov. de 2020 a la(s) 13:45, mostwanted <
> godirao...@gmail.com> escribió:
>
>> Gratitude
>>
>> On Friday, November 20, 2020 at 10:33:10 AM UTC+2 Ramos wrote:
>>
>>> create a module inside web2py
>>> API_Pusher.py
>>>
>>> import pusher
>>>
>>> def pusher_client():
>>> return pusher.Pusher(
>>>   app_id='yourid',
>>>   key='yourkey',
>>>   secret='yoursecret',
>>>   cluster='eu',
>>>   ssl=True
>>> )
>>>
>>>
>>> Then inside your controllers
>>>
>>> from API_Pusher import pusher_client
>>> ...
>>> pusher_client().trigger('fileit', 'plannerPesos',  {'message':
>>> "PlaySound('ok')"})
>>>
>>> Em sex., 20 de nov. de 2020 às 07:41, mostwanted 
>>> escreveu:
>>>
 Hey Ramos, I was able to successfully register the app on pusher.com.
 towards step 4 its says i should copy this code:
 *CODE:*
 curl -H "Content-Type: application/json" \
  -H "Authorization: Bearer
 9C9232906DFC6C8F8115926CC30D637945EB75F60467DA77977C399C4235E61C" \
  -X POST "
 https://733e2240-aca0-4a12-a5a9-c3b1422b9063.pushnotifications.pusher.com/publish_api/v1/instances/733e2240-aca0-4a12-a5a9-c3b1422b9063/publishes;
 \
  -d
 '{"interests":["hello"],"web":{"notification":{"title":"Hello","body":"Hello,
 world!"}}}'

 to my console! Which console is this one? My desktop console? I'm
 hosted with pythonanywhere.com, can i use the Bash console in my
 dashboard?

 On Tuesday, November 17, 2020 at 7:53:20 AM UTC+2 mostwanted wrote:

> Thanks alot Ramos, think this will work, very little work needs to be
> done here, I'll try it out.
>
> On Tuesday, November 17, 2020 at 1:06:10 AM UTC+2 Ramos wrote:
>
>> Why reiventing the wheel ???
>> https://pusher.com/
>>
>> I use it with web2py and works like a charm
>>
>>
>> Em seg., 16 de nov. de 2020 às 08:44, mostwanted 
>> escreveu:
>>
>>> So far all I have been able achieve is asking the user for
>>> permission to send them notifications & if they accept all that happens 
>>> is
>>> that everytime they open the app they get a greetings notification,
>>> achieving that was not complicated because it was straight forward, I
>>> placed the code in my main.js script & it runs everytime the service 
>>> worker
>>> gets registered.
>>>
>>> *CODE:*
>>> Notification.requestPermission(result => {
>>>   if (result === 'granted') {
>>> showNotification('Welcome to My App™', 'Everything Services™')
>>>   }
>>> });
>>>
>>> function showNotification(title, message) {
>>>   if ('Notification' in window) {
>>> navigator.serviceWorker.ready.then(registration => {
>>>   registration.showNotification(title, {
>>> body: message,
>>> tag: 'my-app',
>>> icon:'/init/static/images/icon_192x192.png',
>>> badge:'/init/static/images/icon_128x128.png',
>>> vibrate: [200, 100, 200, 100, 200, 100]
>>>   });
>>> });
>>>   }
>>> }
>>>
>>>
>>> On Monday, November 16, 2020 at 10:31:10 AM UTC+2 mostwanted wrote:
>>>

 Has anyone been able to implement push notifications on their
 web2py apps?

 I need a working application with some examples on how to implement
 this for one of my applications.

 I've been looking at the "web-push-book (
 https://web-push-book.gauntface.com/how-push-works/)" but I cant
 put it together in my head.

 What I wanna achieve is relatively basic, I have an applivcation
 that offers information on services & products sold in my area, so 
 what I
 want is to be able to send notifications everytime a new service or 
 product
 is registered.

 If anyone has any idea on how I can easily implement this please
 help me.

 Regards;

 Mostwanted

>>> --
>>> 

Re: [web2py] Re: Push Notifications

2020-11-20 Thread António Ramos
create a module inside web2py
API_Pusher.py

import pusher

def pusher_client():
return pusher.Pusher(
  app_id='yourid',
  key='yourkey',
  secret='yoursecret',
  cluster='eu',
  ssl=True
)


Then inside your controllers

from API_Pusher import pusher_client
...
pusher_client().trigger('fileit', 'plannerPesos',  {'message':
"PlaySound('ok')"})

Em sex., 20 de nov. de 2020 às 07:41, mostwanted 
escreveu:

> Hey Ramos, I was able to successfully register the app on pusher.com.
> towards step 4 its says i should copy this code:
> *CODE:*
> curl -H "Content-Type: application/json" \
>  -H "Authorization: Bearer
> 9C9232906DFC6C8F8115926CC30D637945EB75F60467DA77977C399C4235E61C" \
>  -X POST "
> https://733e2240-aca0-4a12-a5a9-c3b1422b9063.pushnotifications.pusher.com/publish_api/v1/instances/733e2240-aca0-4a12-a5a9-c3b1422b9063/publishes;
> \
>  -d
> '{"interests":["hello"],"web":{"notification":{"title":"Hello","body":"Hello,
> world!"}}}'
>
> to my console! Which console is this one? My desktop console? I'm hosted
> with pythonanywhere.com, can i use the Bash console in my dashboard?
>
> On Tuesday, November 17, 2020 at 7:53:20 AM UTC+2 mostwanted wrote:
>
>> Thanks alot Ramos, think this will work, very little work needs to be
>> done here, I'll try it out.
>>
>> On Tuesday, November 17, 2020 at 1:06:10 AM UTC+2 Ramos wrote:
>>
>>> Why reiventing the wheel ???
>>> https://pusher.com/
>>>
>>> I use it with web2py and works like a charm
>>>
>>>
>>> Em seg., 16 de nov. de 2020 às 08:44, mostwanted 
>>> escreveu:
>>>
 So far all I have been able achieve is asking the user for permission
 to send them notifications & if they accept all that happens is that
 everytime they open the app they get a greetings notification, achieving
 that was not complicated because it was straight forward, I placed the code
 in my main.js script & it runs everytime the service worker gets 
 registered.

 *CODE:*
 Notification.requestPermission(result => {
   if (result === 'granted') {
 showNotification('Welcome to My App™', 'Everything Services™')
   }
 });

 function showNotification(title, message) {
   if ('Notification' in window) {
 navigator.serviceWorker.ready.then(registration => {
   registration.showNotification(title, {
 body: message,
 tag: 'my-app',
 icon:'/init/static/images/icon_192x192.png',
 badge:'/init/static/images/icon_128x128.png',
 vibrate: [200, 100, 200, 100, 200, 100]
   });
 });
   }
 }


 On Monday, November 16, 2020 at 10:31:10 AM UTC+2 mostwanted wrote:

>
> Has anyone been able to implement push notifications on their web2py
> apps?
>
> I need a working application with some examples on how to implement
> this for one of my applications.
>
> I've been looking at the "web-push-book (
> https://web-push-book.gauntface.com/how-push-works/)" but I cant put
> it together in my head.
>
> What I wanna achieve is relatively basic, I have an applivcation that
> offers information on services & products sold in my area, so what I want
> is to be able to send notifications everytime a new service or product is
> registered.
>
> If anyone has any idea on how I can easily implement this please help
> me.
>
> 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+un...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/web2py/01da1065-f7d3-4394-9014-a424639bef03n%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/ca28be9e-6720-4993-9f68-1a42cf57a2c1n%40googlegroups.com
> 

Re: [web2py] Re: Push Notifications

2020-11-16 Thread António Ramos
Why reiventing the wheel ???
https://pusher.com/

I use it with web2py and works like a charm


Em seg., 16 de nov. de 2020 às 08:44, mostwanted 
escreveu:

> So far all I have been able achieve is asking the user for permission to
> send them notifications & if they accept all that happens is that everytime
> they open the app they get a greetings notification, achieving that was not
> complicated because it was straight forward, I placed the code in my
> main.js script & it runs everytime the service worker gets registered.
>
> *CODE:*
> Notification.requestPermission(result => {
>   if (result === 'granted') {
> showNotification('Welcome to My App™', 'Everything Services™')
>   }
> });
>
> function showNotification(title, message) {
>   if ('Notification' in window) {
> navigator.serviceWorker.ready.then(registration => {
>   registration.showNotification(title, {
> body: message,
> tag: 'my-app',
> icon:'/init/static/images/icon_192x192.png',
> badge:'/init/static/images/icon_128x128.png',
> vibrate: [200, 100, 200, 100, 200, 100]
>   });
> });
>   }
> }
>
>
> On Monday, November 16, 2020 at 10:31:10 AM UTC+2 mostwanted wrote:
>
>>
>> Has anyone been able to implement push notifications on their web2py
>> apps?
>>
>> I need a working application with some examples on how to implement this
>> for one of my applications.
>>
>> I've been looking at the "web-push-book (
>> https://web-push-book.gauntface.com/how-push-works/)" but I cant put it
>> together in my head.
>>
>> What I wanna achieve is relatively basic, I have an applivcation that
>> offers information on services & products sold in my area, so what I want
>> is to be able to send notifications everytime a new service or product is
>> registered.
>>
>> If anyone has any idea on how I can easily implement this please help me.
>>
>> 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/01da1065-f7d3-4394-9014-a424639bef03n%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/CAEM0BxPX9jKzoBFiVK093YXR912h6ZFb5pzPXU%3DyUkF33yi1hw%40mail.gmail.com.


[web2py] Re: python3 import error in Opalstack

2020-11-12 Thread António Ramos
solved.
I need to activate my env first !

Em qui., 12 de nov. de 2020 às 12:16, António Ramos 
escreveu:

> hello i´m using python3 in opastack and got some problems with import
> I installed zeep and web2py is looking in the wrong place for it.
> Any help ?
>
>
>  No module named applications.fileit.modules.zeep
> Versão
> web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
> Python Python 3.6.8: /home/ramos/apps/fileit/env/bin/uwsgi (prefix:
> /home/ramos/apps/fileit/env)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
> 21.
> 22.
> 23.
>
> Traceback (most recent call last):
>   File "/home/ramos/apps/fileit/web2py/gluon/custom_import.py", line 78, in 
> custom_importer
> result = sys.modules[modules_prefix]
> KeyError: 'applications.fileit.modules.zeep'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219, in 
> restricted
> exec(ccode, environment)
>   File 
> "/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
>  <https://portal.cires.pt/admin/edit/fileit/controllers/erp_clients.py>, line 
> 236, in 
>   File "/home/ramos/apps/fileit/web2py/gluon/globals.py", line 430, in 
> 
> self._caller = lambda f: f()
>   File "/home/ramos/apps/fileit/web2py/gluon/tools.py", line 3867, in f
> return action(*a, **b)
>   File 
> "/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
>  <https://portal.cires.pt/admin/edit/fileit/controllers/erp_clients.py>, line 
> 191, in ClientDetail
> CYGSA=getcygsainfo(cliente)
>   File 
> "/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
>  <https://portal.cires.pt/admin/edit/fileit/controllers/erp_clients.py>, line 
> 134, in getcygsainfo
> import zeep
>   File "/home/ramos/apps/fileit/web2py/gluon/custom_import.py", line 80, in 
> custom_importer
> raise ImportError("No module named %s" % modules_prefix)
> ImportError: No module named applications.fileit.modules.zeep
>
>

-- 
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/CAEM0BxM0ef%2BqbVUYADkrwwDb3LKjqBKRaua_xQ%3D%2B7g_nsjQmvw%40mail.gmail.com.


[web2py] python3 import error in Opalstack

2020-11-12 Thread António Ramos
hello i´m using python3 in opastack and got some problems with import
I installed zeep and web2py is looking in the wrong place for it.
Any help ?


 No module named applications.fileit.modules.zeepVersão
web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50
Python Python 3.6.8: /home/ramos/apps/fileit/env/bin/uwsgi (prefix:
/home/ramos/apps/fileit/env)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/custom_import.py", line
78, in custom_importer
result = sys.modules[modules_prefix]
KeyError: 'applications.fileit.modules.zeep'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219,
in restricted
exec(ccode, environment)
  File 
"/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
,
line 236, in 
  File "/home/ramos/apps/fileit/web2py/gluon/globals.py", line 430, in 
self._caller = lambda f: f()
  File "/home/ramos/apps/fileit/web2py/gluon/tools.py", line 3867, in f
return action(*a, **b)
  File 
"/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
,
line 191, in ClientDetail
CYGSA=getcygsainfo(cliente)
  File 
"/home/ramos/apps/fileit/web2py/applications/fileit/controllers/erp_clients.py"
,
line 134, in getcygsainfo
import zeep
  File "/home/ramos/apps/fileit/web2py/gluon/custom_import.py", line
80, in custom_importer
raise ImportError("No module named %s" % modules_prefix)
ImportError: No module named applications.fileit.modules.zeep

-- 
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/CAEM0BxOxLi4J-b9MRDY5Z05%2BhC6HE7ZsfPHuSEHru1%3D4LGT22g%40mail.gmail.com.


Re: [web2py] Scheduler on Opalstack

2020-11-10 Thread António Ramos
it worked for me.

Em ter., 10 de nov. de 2020 às 09:25, Gaël Princivalle <
gaelprinciva...@gmail.com> escreveu:

>
> Hello.
>
> Did someone tried to use the scheduler on Opalstack?
>
> I was used to run this command to start a worker in Webfaction but in
> Opalstack it don't works:
> nohup python web2py.py -K applicationname &
>
> I've tried in also in the virtualenv no way.
>
> Someone knows how I can do it?
>
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/58d806b1-48e1-473b-82d4-5e2aaa0c8002n%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/CAEM0BxO9vZkpqqy6KCKciLrGpUctPk79FRzum_f%3DN9ZxdUWUxw%40mail.gmail.com.


Re: [web2py] Re: Migrate a PostgreSQL Webfaction DB to Opalstack

2020-10-27 Thread António Ramos
rsync is awesome :)
thank you


Em ter., 27 de out. de 2020 às 13:00, Jose C 
escreveu:

> Opalstack have some migration tools available:
> https://community.opalstack.com/d/155-howto-migrate-stuff-automatically-from-webfaction
>
> Also I found my old notes from when I moved my web2py apps and PG
> databases over 18 months ago, hopefully they will help.  Also includes how
> to sync images directories between servers...
>
>
> 1) sync photos directories between WF and OS:
>
> rsync -avh --dry-run   @web565.webfaction.com:
> /home//virtenvs//lib/web2py/applications/
> /static/photos/home//virtenvs//lib/web2py/
> applications//static  > results_photos.txt
>
> logs what would happen to the results_photos.txt file.
>
> When ready to execute, remove the --dry-run parameter above.
>
> 2) on WF server:
> pg_dump -U  -d  -h localhost -p  -f
> re_livedump.sql
> gzip re_livedump.sql
>
>
> 3) copy to OS server and gunzip the file on the server.
>
> 4) ensure web2py server is not running (remember to comment out crontab
> autostart line as well)
> delete contents of the web2py/applications//databases directory.
>
> 5) on OS server, go into psql and remove existing tables, etc. if they
> exist:
> psql -U  -d 
> DROP OWNED BY ;
>
> 6) load new database
> psql -U  -d  -f re_livedump.sql
>
> there may be a few error messages about the owner being different, safe
> to ignore.
>
> 7) set web2py DAL flags:
> migrate=True
> fake_migrate=True
> lazy_tables=False
>
> 8) start up web2py.  Verify all table files created in the databases
> directory.
>
> 9) shutdown web2py and set the above flags to their inverses.  Also
> uncomment the crontab autostart line.
>
> 10) startup again and verify site is working as expected.  An option is
> to mount your new OS web2py app on a temp domain, sub-domain or even on
> .opalstacked.com for testing.
>
>
> HTH,
>
> --
> 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/a7031961-424b-46c7-9c3a-4b1a02ca46f1o%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/CAEM0BxN%3DjOZJrYHAZDZFAQkH0fH5rx%2B-ARhj1ybHOxiz8UVcdA%40mail.gmail.com.


Re: [web2py] Migrate a PostgreSQL Webfaction DB to Opalstack

2020-10-26 Thread António Ramos
i had the same path.
Images you should , i think, just download from webfaction and upload to
opalstack to uploads folder.
I used dbeaver to export from webfaction . and then psql to insert in
opalstack.
I had the same problem but i used migrate=False. Check docs.
Not much but hope it helps.
Ramos


Em seg., 26 de out. de 2020 às 19:15, Gaël Princivalle <
gaelprinciva...@gmail.com> escreveu:

> Hi.
>
> I'm still trying to migrate my Web2py applications from Webfaction to
> Opalstack.
>
> Well here what I do:
> 1 I export the DB form Webfaction in the dump.sql file
> What are the best options?
> For one website only the Data's in the Copy mode has worked well.
> For another one I've loose some records.
> Any suggestion?
>
> 2 I create a new PostgreSQL DB in Opalstack.
>
> 3 I modify my DB string connection in Web2py like that:
> db = DAL('postgres://mydbuser:mydbpassword@localhost:5432/mydb',
> check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True,
> migrate=True, fake_migrate_all=False)
> The idea is to create the tables before importing the data.
> So here there is the problem to understand if setting migrate and
> fake:migrate_all to True or False. Any suggestion?
>
> 4 I import the data in the new DB:
> psql -U mydbuser mydb < dump.sql
>
> Depending of the attempts I have these errors:
> relation "table..." does not exist
> Some tables are not imported (empty)
> Web2py don't find the images stored in records
>
> Any idea is interesting, 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/5dac3729-f70c-405b-81c8-a0c7fa0112d7n%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/CAEM0BxMNMABMyTynjW%3D2gB75Ei50RcN3Rn%2BoXoPxuUYjTvQdRw%40mail.gmail.com.


Re: [web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread António Ramos
me too am crying a litle
just send email to supp...@opalstack.com
The response time is not as fast as webfaction support but maybe the are
having a burst of clients from webfaction.

regards
António

Em qua., 21 de out. de 2020 às 14:42, Jose C 
escreveu:

>
> On Wednesday, 21 October 2020 13:50:05 UTC+1, Gaël Princivalle wrote:
>>
>> Thank you José, I've found the README file and the password.
>> However this password is not accepted.
>> I've made another Web2py installation but the result is the same.
>>
>> As this is quite the first step to migrate my Web2py websites to
>> Opalstack I just would like to cry...
>>
>>
> Don't cry yet... it appears that the script and process worked ok for
> Carlos above given his (it works) comment so you must be close!
>
> Perhaps if you provide detailed steps of what you are doing and where you
> are trying to enter/use the password, someone may be able to help.
>
> How are you starting web2py?
> Are you activating the virtualenv first (that was created by the script)?
> If so, it should appear within ( ) in your command prompt.
> What error message(s) are you getting? At what point?
>
>
>
>
> --
> 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/66109b3b-57da-4b8a-8152-9bc701ec47b5o%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/CAEM0BxMS%3D40bWY-qQvM%2BnD4xEFhH12J0%3DeFUOfjFW%2BGjOGeq5g%40mail.gmail.com.


Re: [web2py] Re: python3 sintax

2020-10-19 Thread António Ramos
thank u :)


Em seg., 19 de out. de 2020 às 22:13, Jose C 
escreveu:

>
>
> On Monday, 19 October 2020 22:06:02 UTC+1, Ramos wrote:
>>
>> can someone help ? understant why this worked in python 2.7 and not python 
>> 3.6
>>
>>   File 
>> "/home/ramos/apps/fileit/web2py/applications/fileit/views/default/user.html",
>>  line 75
>> if 'HELP' in globals() and globals()['HELP']<>[]:
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>
> The <> operator is deprecated in python3.  Use != instead.
>
> --
> 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/956703c4-e8f0-4c81-921d-df5aab5343dao%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/CAEM0BxPEtjuuOMxJPkWSG4bfcYA-V_cai4zXe%2B6%2BB9r0r0Szsw%40mail.gmail.com.


[web2py] python3 sintax

2020-10-19 Thread António Ramos
can someone help ? understant why this worked in python 2.7 and not
python 3.6

  File 
"/home/ramos/apps/fileit/web2py/applications/fileit/views/default/user.html",
line 75
if 'HELP' in globals() and globals()['HELP']<>[]:
 ^
SyntaxError: invalid syntax

-- 
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/CAEM0BxOcSsE8LHWuUiSz49TbWgDeb9r-baorwF4%2BVq%2BrXaEomA%40mail.gmail.com.


Re: [web2py] Re: opalstack dal connection time out ?

2020-10-19 Thread António Ramos
got the answer from support

Hi António, if you need psycopg2 then please install it like this:

export PATH=/usr/pgsql-11/bin/:$PATH
cd ~/apps/fileit
source env/bin/activate
pip install psycopg2

--
Sean from (((Opalstack


It worked for me 

thank you

Em seg., 19 de out. de 2020 às 20:03, Jose C 
escreveu:

> I'm also on opal5 using postgres but still on web2py 2.18.5 (can't upgrade
> due to unresolved redis session issue).
>
> I suspect you have a library version problem.
>
> You're using the default system-wide python3 install, which is using
> psycopg2 version 2.7.7.  (Run psycopg2.__version__ at the command line
> after importing).
>
> The highly recommended way to do this (to avoid conflicts and maintain
> your sanity) is to create yourself a virtual environment for your web2py
> app.  Then pip install psycopg2-binary (plus whatever other packages you
> need for that app) which installs version 2.8.4 of the psycopg2 library.
>
> Using this combo you should have no issues.
>
> HTH,
>
>
>
>
>
>
>
> On Monday, 19 October 2020 16:56:05 UTC+1, Ramos wrote:
>>
>> hello i´m starting my journey on Opalstack and my app cant connect to the
>> postgresql db
>>
>>  db = DAL('postgres://user:pwdXru@localhost:5432/database',
>>
>> the previous line does not work. I checked that psycopg2 is available in
>> python command line
>> [image: image.png]
>>
>>  Failure to connect, tried 5 times: Traceback (most
>> recent call last): File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py", line
>> 507, in __init__ self._adapter = adapter(**kwargs) File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>> line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
>> line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args,
>> **kwargs) File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>> line 67, in __init__ after_connection, File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs)
>> File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 85, in __init__ self.find_driver() File
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 134, in find_driver "No driver of supported ones %s is available" %
>> str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',)
>> is availableVersão
>> web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>> 11.
>> 12.
>> 13.
>> 14.
>> 15.
>> 16.
>> 17.
>> 18.
>> 19.
>> 20.
>> 21.
>> 22.
>> 23.
>> 24.
>> 25.
>> 26.
>> 27.
>> 28.
>>
>> Traceback (most recent call last):
>>   File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219, in 
>> restricted
>> exec(ccode, environment)
>>   File "/home/ramos/apps/fileit/web2py/applications/fileit/models/db1.py" 
>> , 
>> line 34, in 
>> check_reserved=['mysql', 'postgres'])  # ['all'])
>>   File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py", 
>> line 209, in __call__
>> obj = super(MetaDAL, cls).__call__(*args, **kwargs)
>>   File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py", 
>> line 526, in __init__
>> "Failure to connect, tried %d times:\n%s" % (attempts, tb)
>> RuntimeError: Failure to connect, tried 5 times:
>> Traceback (most recent call last):
>>   File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py", 
>> line 507, in __init__
>> self._adapter = adapter(**kwargs)
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>>  line 28, in __call__
>> return AdapterMeta.__call__(cls, *args, **kwargs)
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
>>  line 41, in __call__
>> obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>>  line 67, in __init__
>> after_connection,
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 417, in __init__
>> super(SQLAdapter, self).__init__(*args, **kwargs)
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 85, in __init__
>> self.find_driver()
>>   File 
>> "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 134, in find_driver
>> "No driver of supported ones %s is available" % str(self.drivers)
>> RuntimeError: No driver of supported ones ('psycopg2',) is available
>>
>>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - 

[web2py] opalstack dal connection time out ?

2020-10-19 Thread António Ramos
hello i´m starting my journey on Opalstack and my app cant connect to the
postgresql db

 db = DAL('postgres://user:pwdXru@localhost:5432/database',

the previous line does not work. I checked that psycopg2 is available in
python command line
[image: image.png]

 Failure to connect, tried 5 times: Traceback (most
recent call last): File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py", line
507, in __init__ self._adapter = adapter(**kwargs) File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args,
**kwargs) File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
line 67, in __init__ after_connection, File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs)
File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 85, in __init__ self.find_driver() File
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 134, in find_driver "No driver of supported ones %s is available" %
str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',)
is availableVersão
web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.

Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/restricted.py", line 219,
in restricted
exec(ccode, environment)
  File "/home/ramos/apps/fileit/web2py/applications/fileit/models/db1.py"
,
line 34, in 
check_reserved=['mysql', 'postgres'])  # ['all'])
  File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py",
line 209, in __call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
  File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py",
line 526, in __init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File "/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/base.py",
line 507, in __init__
self._adapter = adapter(**kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
line 28, in __call__
return AdapterMeta.__call__(cls, *args, **kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
line 41, in __call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
line 67, in __init__
after_connection,
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 417, in __init__
super(SQLAdapter, self).__init__(*args, **kwargs)
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 85, in __init__
self.find_driver()
  File 
"/home/ramos/apps/fileit/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 134, in find_driver
"No driver of supported ones %s is available" % str(self.drivers)
RuntimeError: No driver of supported ones ('psycopg2',) is available

-- 
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/CAEM0BxNNZmWyDf2aKcHQJHs4TNsF7puXnV0VJ%2BWdCjjt0AewFA%40mail.gmail.com.


[web2py] web2py with python 3.6 index.html returns plain text

2020-10-17 Thread António Ramos
hello i´m testing my app from python 2.7 with python 3.6 on another web2py
server with web2py 2.20.4
i resolved all issues so far but now only my index.html pages returns plain
text
other pages are ok.
any help?
[image: image.png]

-- 
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/CAEM0BxNH8RNOYZZxyM4LjH0SmdbjEA0JkN6W6UJ%2Bs3sOT44ztw%40mail.gmail.com.


[web2py] python3.6 No module named applications.lab.modules.requests

2020-10-17 Thread António Ramos
hello i'm trying web2py with python3 and have an issue with python requests
Why is it looking for requests inside my app modules folder ??
regards
[image: image.png]

-- 
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/CAEM0BxMN%2BY-pUxfo%3DnOFpE4PbfbX9-D%2B8ECU_D%2Bd3Bcfrugs3A%40mail.gmail.com.


Re: [web2py] Re: web2py hosting

2020-10-16 Thread António Ramos
This is not good for me , opalstack is offline for support sometimes.

Webfaction is always on and has a ticketing system with a priority flag!

[image: image.png]

Em sex., 16 de out. de 2020 às 10:30, Jose C 
escreveu:

> HI Antonio,
>
> Can't speak as to pythonanywhere, but Opalstack definitely supports
> automatic Letsencrypt certificates - I have it set up on all my sites.  You
> just flip a switch on each website and the rest is handled automatically,
> including auto-renewals.
> See:
> https://help.opalstack.com/article/35/how-can-i-use-a-lets-encrypt-ssl-certificate
>
> Also for other general info you may need:
> https://help.opalstack.com/category/1/opalstack-guide
> 
>
> I also used to use the mail2script functionality when on WF to handle
> incoming bounced emails.  Last I inquired Opalstack said it was on their to
> do list as they were working on their API, but they suggested an easy
> workaround which I've been using since then with no problems.
>
> On Opalstack I implemented the same functionality by dumping copies of
> incoming emails I wanted to process into one specific dedicated IMAP
> mailbox.  Then my script runs via cron (every 5 minutes) and checks that
> mailbox periodically for new messages, processes them and deletes them from
> the mailbox.
>
> The code is simple (sorry, I can't find the code formatting options in
> this new google reply interface):
> # Connect to imap mailbox.
> ctx = ssl.create_default_context()
> server = imaplib.IMAP4_SSL(host=imaphost, ssl_context=ctx)
> server.login(mailbox,passwd)
> server.select()
> resp, items = server.search(None, "UNSEEN")
>
> # process any message(s).
> for i in items:
>  resp, data = server.fetch(i, "(RFC822)")
>  do whatever with the message here..
>  server.store(i, '+FLAGS', '\\Deleted')   # Set delete
> flag on this message.
>
> server.expunge()# Physically remove messages that are
> flagged as deleted from the mailbox (actually delete).
> server.close()
> server.logout()
>
>
> There's also a near realtime example using IMAP IDLE listeners if once a
> minute via cron isn't enough.  See this thread for details:
> https://community.opalstack.com/d/13-mail2script-functionality
>
> HTH,
>
> Jose
>
>
> On Friday, 16 October 2020 at 09:44:02 UTC+1 Ramos wrote:
>
>> i need https ssl certificates (automatic letsencrypt). opalstack and
>> pythonanywhere dont refer this option as available.
>> also i have a virtual email address that forward incoming emails to
>> python script like pic attached. Do pythonanywhare permit this ? i already
>> know that opalstack dont permit this yet..
>> [image: image.png]
>>
>>
>> --
> 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/01ce7579-93dd-405b-8aad-e823f3940628n%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/CAEM0BxOLM6K0bo%3DfJyNOONgHueEOYhUAbK2%3D6Fw1NE7dq6wP9A%40mail.gmail.com.


Re: [web2py] Re: web2py hosting

2020-10-16 Thread António Ramos
i need https ssl certificates (automatic letsencrypt). opalstack and
pythonanywhere dont refer this option as available.
also i have a virtual email address that forward incoming emails to python
script like pic attached. Do pythonanywhare permit this ? i already
know that opalstack dont permit this yet..
[image: image.png]


Em qua., 14 de out. de 2020 às 23:28, Jose C 
escreveu:

> Hi Antonio,
>
> I just saw this announcement:
> https://www.webfaction.com/faq
>
> Reading the "What will not be available when I am migrated to tsohost"...
> makes you wonder what they actually do host on their servers!  And they're
> starting migrations in a couple of weeks and shutting WF down 100% in March.
>
> Anyone who liked the WF control panel, services offered and way of doing
> things AND who wants a seamless transfer of their sites to another host, do
> yourselves a favour and create an account on Opalstack and check them out.
> You should feel right at home.
>
> Either way, good luck with your migrations.
>
> Jose
>
> On Wednesday, 14 October 2020 at 15:51:52 UTC+1 Ramos wrote:
>
>> no python??? on TsoHost??
>>
>> Em qua., 14 de out. de 2020 às 15:50, António Ramos 
>> escreveu:
>>
>>> no postgresql db... i´m doomed
>>>
>>> Em qua., 14 de out. de 2020 às 15:00, Gaël Princivalle <
>>> gaelpri...@gmail.com> escreveu:
>>>
>>>> I think the new business TsoHost plans are the ones that will replace
>>>> the Webfaction cloud plans:
>>>> https://www.tsohost.com/business-hosting
>>>>
>>>> Il giorno mercoledì 14 ottobre 2020 alle 15:55:32 UTC+2 Gaël
>>>> Princivalle ha scritto:
>>>>
>>>>> Hi Antonio.
>>>>>
>>>>> i'm worried about the same thing.
>>>>>
>>>>> It seems that all the applications gone be migrated to TsoHost, a
>>>>> Godaddy company.
>>>>>
>>>>> Someone have some experience about Web2py on TsoHost  ?
>>>>>
>>>>> Il giorno venerdì 22 maggio 2020 alle 09:45:12 UTC+2 Ramos ha scritto:
>>>>>
>>>>>> I´m a webfaction long time user and from another post here i got
>>>>>> worried about the godaddy acquisition.Eventually webfaction may die in a
>>>>>> short term period.
>>>>>>
>>>>>> Can you recommend a good alternative?
>>>>>> Can you share your experience?
>>>>>>
>>>>>> Opalstack
>>>>>> pythonanywhere
>>>>>>
>>>>>> others ?
>>>>>>
>>>>>> regards
>>>>>> António
>>>>>>
>>>>> --
>>>> 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+un...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/web2py/515e3e7a-375e-4a9c-9708-2dd0d59cda3an%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/web2py/515e3e7a-375e-4a9c-9708-2dd0d59cda3an%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
> 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/4560eb38-1896-4402-9021-28da7ae5e065n%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/4560eb38-1896-4402-9021-28da7ae5e065n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAEM0BxM-3OO3%2BM03YrSeUBQj03SAW5BpdwjrV10UUqs2GWia1Q%40mail.gmail.com.


Re: [web2py] Re: web2py hosting

2020-10-14 Thread António Ramos
no python??? on TsoHost??

Em qua., 14 de out. de 2020 às 15:50, António Ramos 
escreveu:

> no postgresql db... i´m doomed
>
> Em qua., 14 de out. de 2020 às 15:00, Gaël Princivalle <
> gaelprinciva...@gmail.com> escreveu:
>
>> I think the new business TsoHost plans are the ones that will replace the
>> Webfaction cloud plans:
>> https://www.tsohost.com/business-hosting
>>
>> Il giorno mercoledì 14 ottobre 2020 alle 15:55:32 UTC+2 Gaël Princivalle
>> ha scritto:
>>
>>> Hi Antonio.
>>>
>>> i'm worried about the same thing.
>>>
>>> It seems that all the applications gone be migrated to TsoHost, a
>>> Godaddy company.
>>>
>>> Someone have some experience about Web2py on TsoHost  ?
>>>
>>> Il giorno venerdì 22 maggio 2020 alle 09:45:12 UTC+2 Ramos ha scritto:
>>>
>>>> I´m a webfaction long time user and from another post here i got
>>>> worried about the godaddy acquisition.Eventually webfaction may die in a
>>>> short term period.
>>>>
>>>> Can you recommend a good alternative?
>>>> Can you share your experience?
>>>>
>>>> Opalstack
>>>> pythonanywhere
>>>>
>>>> others ?
>>>>
>>>> regards
>>>> António
>>>>
>>> --
>> 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/515e3e7a-375e-4a9c-9708-2dd0d59cda3an%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/515e3e7a-375e-4a9c-9708-2dd0d59cda3an%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAEM0BxOXusHdEyDaVHqWyx9LuzzyvyHSO0yZ1RKxgc-d4kMTKw%40mail.gmail.com.


Re: [web2py] Re: web2py hosting

2020-10-14 Thread António Ramos
no postgresql db... i´m doomed

Em qua., 14 de out. de 2020 às 15:00, Gaël Princivalle <
gaelprinciva...@gmail.com> escreveu:

> I think the new business TsoHost plans are the ones that will replace the
> Webfaction cloud plans:
> https://www.tsohost.com/business-hosting
>
> Il giorno mercoledì 14 ottobre 2020 alle 15:55:32 UTC+2 Gaël Princivalle
> ha scritto:
>
>> Hi Antonio.
>>
>> i'm worried about the same thing.
>>
>> It seems that all the applications gone be migrated to TsoHost, a Godaddy
>> company.
>>
>> Someone have some experience about Web2py on TsoHost  ?
>>
>> Il giorno venerdì 22 maggio 2020 alle 09:45:12 UTC+2 Ramos ha scritto:
>>
>>> I´m a webfaction long time user and from another post here i got worried
>>> about the godaddy acquisition.Eventually webfaction may die in a short term
>>> period.
>>>
>>> Can you recommend a good alternative?
>>> Can you share your experience?
>>>
>>> Opalstack
>>> pythonanywhere
>>>
>>> others ?
>>>
>>> regards
>>> António
>>>
>> --
> 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/515e3e7a-375e-4a9c-9708-2dd0d59cda3an%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/CAEM0BxPeqChDA6ZLPL7kyZYHsBGrKW7NfuUYq7O8e1r_SzGRHA%40mail.gmail.com.


Re: [web2py] Re: OT PollyReports generate PDF using bands from DB

2020-10-06 Thread António Ramos
my favourite

https://www.reportbro.com/demo/invoice
i has a web2py tutorial of installation.

Em ter., 6 de out. de 2020 às 12:47, villas  escreveu:

> It is strange that Geraldo Reports and PollyReports do not seem to have
> been maintained for years.
> Maybe everyone is using something else these days?
>
> On Thursday, 1 October 2020 at 15:58:39 UTC+1 DenesL wrote:
>
>>
>> While searching for a Python PDF package I found PollyReports and was
>> pleasantly surprised by it, and it is also nicely documented.
>>
>> PollyReports is a small, light module providing a simple way to generate
>> reports from databases using Python.
>>
>> Reference: https://pythonhosted.org/PollyReports/docs.html
>> Tutorial: https://pythonhosted.org/PollyReports/tutorial.html
>> Other features (subreports): https://opensource.gonnerman.org/?cat=4
>>
>> I hope you find it as useful as I did.
>>
>> Regards,
>> Denes
>>
>>
>>
>> --
> 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/862aec4e-1ef8-41eb-8b15-c0e3ccdb5c4en%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/CAEM0BxPc2R%2BVsi5T8iMy2iQ1VBnvsVoQUt6uhJc8gVKejAcpFw%40mail.gmail.com.


Re: [web2py] Re: Having a function always running in the background

2020-09-03 Thread António Ramos
maybe this online cron can help.

https://www.easycron.com/

Em qui., 3 de set. de 2020 às 02:31, Andy W 
escreveu:

> If you are using PythonAnywhere, they have Scheduled Tasks and (for paid
> accounts) an Aways-on Task.
> These are very simple to use. I use them for managing the queue of
> outgoing emails.
>
> Andy
>
> On Wednesday, September 2, 2020 at 5:09:15 PM UTC+10 mostwanted wrote:
>
>> You are on point Jim, you get what i'm trying to achieve, let me see if i
>> can put it together.
>>
>> Regards;
>>
>> On Tuesday, September 1, 2020 at 8:48:34 PM UTC+2 Jim S wrote:
>>
>>> Ah, so this sounds a little different than what I thought you were after.
>>>
>>> Looks like you want to run a task at a regularly scheduled time, not
>>> based on something that you've triggered in your application.
>>>
>>> Given that information, I'd turn to the scheduler on my host system.
>>> Are you running Linux then I'd just create a cron job.  Windows - add it to
>>> the windows scheduler (they still have that on windows server, right?)
>>>
>>> Then I would go here ->
>>> http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options
>>>
>>> to learn how to craft a command that would call my script to determine
>>> who to send emails to, and then send them.
>>>
>>> Does that help?
>>>
>>> (or, please correct me if my understanding of your problem is still off)
>>>
>>> -Jim
>>>
>>>
>>> On Tuesday, September 1, 2020 at 11:59:02 AM UTC-5, mostwanted wrote:

 Hey Jim, I'm failing to understand the scheduler, please if its not a
 bother simplify it for me. In my script below I wanna send users who host
 stuff on my site emails when their subscription is left with 7 days to
 expire. Ideally twice a week for these 7 days. I'm hosting my app with
 pythonanywhere. How do i put it together?

 *CODE*:









 *import datetimedef email_reminder():
 dt=db(db.house_owner).select()for dt in dt:
 now_dt=dt.expiry_date-request.now.date()
 now_dt2=now_dt.daysnew_con=dt.controller+1if
 now_dt2 <= 7:mail.send(to=dt.email_address,subject="House
 Hosting Reminder",message ='Hello %s %s, \nThis is a reminder that your
 house listing with our service will expire in %d days. \nTo increase your
 suscription time or for further details please contact us at the given
 details.\n\nBest regards;' % (dt.Name, dt.Surname, now_dt2))
 db(db.house_owner.controller).update(controller=new_con)*

 *Regards;  *

 On Tuesday, September 1, 2020 at 4:02:42 PM UTC+2 Jim S wrote:

> The web2py scheduler pretty much is a background task that runs
> unnoticed.
>
> I use it in a number of places to queue hundreds or thousands of
> outbound emails.  I like the scheduler because it then also servers as a
> log of the emails that were sent.
>
> If that isn't what you're looking for then how about celery or
> redis-queue?  But, they are a bother because then you have more services
> you need to grok, start up and manage.  The web2py scheduler takes care of
> all of that for you.  Let me know if you want to see a sample of how we
> handle it.
>
> -Jim
>
>
> On Tuesday, September 1, 2020 at 8:41:27 AM UTC-5, mostwanted wrote:
>>
>>
>> Is there a way to have a function always running without having to
>> use a scheduler?
>> I have a function that i want to always send emails based on its
>> arguments & conditions but i want it to run in the background unnoticed
>> like a worker but not run by a scheduler, is this possible? I hope my
>> question is clear.
>>
>> 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/b09e640c-fd89-4d03-803a-53b5f9e91df2n%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 

Re: [web2py] Voting & Rating

2020-08-25 Thread António Ramos
If the vote was made by a logged in user you should find it in the db right
?

Em ter., 25 de ago. de 2020 às 17:31, mostwanted 
escreveu:

>
> Hey guys, I'm looking at the voting & rating example on the book (
> http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax?search=voting#Voting-and-rating)
> & was wondering how I could use* (request.env.remote_addr) *to prevent a
> previously voted user from voting again.
>
> 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/3b88b13e-4490-4dad-b5db-88056e853f25n%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/CAEM0BxNght7Ac5SnXZHy6%3DpqhHNqnZY0hhtT__hjgDGQRYkSZg%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.


Re: [web2py] How to call other (and retrieve data/dictionnary ... ) web2py applications from within a web2py application

2020-06-22 Thread António Ramos
I guess only with http requests

L c  escreveu em seg, 22/06/2020 às 11:01 :

> Hello,
>
> there is an item on this subject however the links do not work anymore. Is
> there a simple, functional recipe to this question.
> Thank you in advance
> PS: I've looked in the book and I can't find a clear answer.
>
> --
> 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/76c5e8d9-9f87-4d2a-a24c-07c04cb25880o%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/CAEM0BxOUXimdTc98CO_UBy5OFhirL9A0FtfZbO%2B%2BgCbOXt1wAA%40mail.gmail.com.


Re: [web2py] Problems using Restful method PUT

2020-06-21 Thread António Ramos
Can you detail a litle more your vuejs and web2py side code?


Em sáb., 20 de jun. de 2020 às 00:32, Ariel Antunez <
ariel.antunezcant...@gmail.com> escreveu:

> Hi everyone, I am working in a application using vue.js on vue-cli and
> axios. I need to use the method PUT, but I get the error, METHOD NOT
> ALLOWED, I write a headers in the controllers. POST and GET work perfect.
> How can I resolve that Problem? 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/a2f3c667-cf63-494d-9862-984389fc0b8fo%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/CAEM0BxOzmKMCH7nbHG4OMfrB1WvT7C5qkty5dZDwivZKg1sNtg%40mail.gmail.com.


Re: [web2py] Schema for auth table

2020-06-21 Thread António Ramos
Why do you want or need schema B?

Em sáb., 20 de jun. de 2020 às 21:14, Deep Shah 
escreveu:

> Hi Team,
>
> I have 2 schemas A and B. Default schema for user is A. I am using
> postgres.
> I have authetication table in schema B. When i run application
> auth.define_tables create auth table in schema A.
> What should i do to make it refer auth tables in schema B rather than
> creating in A.
>
> Please help me with this.
> Thanks
>
> DISCLAIMER: This email and any attachments transmitted with it may contain
> confidential, copyrighted, proprietary and legally privileged information
> and is intended only for the individual named. If you are not the named
> addressee you should not disseminate, distribute, print, disclose or copy
> this e-mail. Please notify the sender immediately by e-mail if you have
> received this e-mail by mistake and destroy this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late,
> incomplete or virus-free. The sender does not accept liability for any
> errors or omissions in the contents of this message, which arise as a
> result of e-mail transmission.
>
> --
> 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/3d47aad0-44a2-42bc-b5b4-f4e1725137d7n%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/CAEM0BxMx6v7wbaQqB0jJdBKTbuQ67PzdcOHKcE0X19SLd%3Dv-Wg%40mail.gmail.com.


Re: [web2py] No module named error

2020-06-21 Thread António Ramos
check here
https://stackoverflow.com/questions/4657484/how-can-i-use-modules-in-web2py



Em sáb., 20 de jun. de 2020 às 21:14, patito feo 
escreveu:

> Hi,
>
> Please define "all ok"
>
> __init__.py file in /modules
> .py file in /modules
>
>
> Thnx for your help!
>
>
>
>
> El sábado, 13 de junio de 2020, 18:45:39 (UTC-5), Ramos escribió:
>>
>> if all is ok, restart web2py
>>
>> Em dom., 14 de jun. de 2020 às 00:35, patito feo 
>> escreveu:
>>
>>> Hi,
>>>
>>> Im trying to use a module file inside /modules/ folder but keep getting
>>> this error.
>>>
>>>
>>> failed to reload module because:
>>>
>>> ImportError('No module named mdplenus.modules.test',)
>>>
>>> --
>>> 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 web...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%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/64e635de-af0b-4184-8ae5-d887eb52e346o%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/CAEM0BxM%2By-iD34AE6Lbo3t3qLok_Sj28qjVQKysDA3Uxi46dDg%40mail.gmail.com.


Re: [web2py] No module named error

2020-06-13 Thread António Ramos
if all is ok, restart web2py

Em dom., 14 de jun. de 2020 às 00:35, patito feo 
escreveu:

> Hi,
>
> Im trying to use a module file inside /modules/ folder but keep getting
> this error.
>
>
> failed to reload module because:
>
> ImportError('No module named mdplenus.modules.test',)
>
> --
> 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/ba92fb90-96da-48a1-8130-b12a0256bb84o%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/CAEM0BxMSw8NOVhSREc8mF8QK3Ph%3D2Cr-C%2BN%2BbjSq8Eoa0G9i8w%40mail.gmail.com.


Re: [web2py] How to clear a list in a view with jquery

2020-06-07 Thread António Ramos
i guess you mean
{{for detail in details:}}
instead of
{{for detail*s* in details:}}

anyway
the python code is rendered in server before being sent to the view. so
your script cant change any of your python code output
You could use the ajax function to update a div content or better vuejs or
other frontend framework...

Ramos

Em sáb., 6 de jun. de 2020 às 23:13, mostwanted 
escreveu:

> Guys is it possible to clear a list in a view using jquery?
> Something like this:
>
> *CODE EXAMPLE:*
> {{if details:}}
> {{for details in details:}}
>
> {{=details.first_name}}
> {{=details.last_name}}
> {{pass}}
>
>
>
>
>
>
>
>
>
>
> *$(function(){$('#close').click(function(e){{{details.clear()}};});});*
>
> How can I achieve this because?
>
> 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/9831eef9-75ec-4c58-b86b-92f97d59e510o%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/CAEM0BxNm1_4ovkC5aD2XCbSztLDExOC-EyvSLpoAN43gDgA8fA%40mail.gmail.com.


[web2py] Re: urgent web2py 2.20.4 scheduler error ?!?=

2020-05-28 Thread António Ramos
i am using python 2.7.5!!!
any help ??

Em qui., 28 de mai. de 2020 às 21:50, António Ramos 
escreveu:

> [image: image.png]
> any help please ?
>
> regards
> António
>

-- 
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/CAEM0BxP8Hukf24DwiYZV9-MXgB%2BytrUaTeofvObmW0x4npJx_Q%40mail.gmail.com.


[web2py] urgent web2py 2.20.4 scheduler error ?!?=

2020-05-28 Thread António Ramos
[image: image.png]
any help please ?

regards
António

-- 
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/CAEM0BxPMzy%3DTbkwK_KjEje3VFcEXzdSz-tkXJgOvm42sza38MQ%40mail.gmail.com.


[web2py] email template framework

2020-05-23 Thread António Ramos
Nice
https://mjml.io/

django is using it ...

https://github.com/liminspace/django-mjml

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


[web2py] web2py hosting

2020-05-22 Thread António Ramos
I´m a webfaction long time user and from another post here i got worried
about the godaddy acquisition.Eventually webfaction may die in a short term
period.

Can you recommend a good alternative?
Can you share your experience?

Opalstack
pythonanywhere

others ?

regards
António

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


Re: [web2py] Re: Webfaction anyone ??

2020-05-21 Thread António Ramos
I will look at it
thank you


Em qui., 21 de mai. de 2020 às 20:48, Jose C 
escreveu:

> A bit off-topic (other than the title) but given the GoDaddy buyout of
> webfaction (putting it on temporary life support) you may want to consider
> thinking about options for your hosting if they follow through and shutdown
> webfaction and enforce the godaddy migration they announced.  I'd been a
> webfaction client since they virtually started up, but have moved to opalstack
> and never looked back... It's founded by 3
> ex-webfaction guys who you'll probably recognise from their support forum
> posts.
>
> Superb service, familiar webfaction-y control panel (made it ultra easy to
> move all my web2py apps, they even have a python-uwsgi one click install)
> with all the trimmings plus DKIM support for mail, choice of server and
> mailbox locations and the list just goes on.
>
> Nothing to gain from this post, just a satisfied client that spent many
> long hours looking for and evaluating alternatives to WF and at long last,
> found the Opalstack guys.  Been with them a year now, using their shared
> servers in Germany and the US.
>
> Hope this helps/saves someone a lot of effort and time,
>
> Jose
>
> --
> 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/0590a30f-2470-4921-8fa1-2d1f3540d5c1%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/CAEM0BxN0fvuRbg9zg8jHHhqb0ZSfHTueE74YADi6j_TkBb78YA%40mail.gmail.com.


Re: [web2py] Re: uwsgi from python2.7 to python3

2020-05-21 Thread António Ramos
no, but i dont want to mess with uwsgi because i may need to use python 2.7
again as i´m fixing code bugs from 2.7 to 3.
will i have problems upgrading uwsgi but using python 2.7?


Em qui., 21 de mai. de 2020 às 13:28, Clemens <
clemens.odend...@claret-clover.de> escreveu:

> Have you already installed the python-3-uwsgi-lib?
>
> *pip3* install --no-binary :all: --upgrade uwsgi
>
> Have a try!
>
> Regards
> Clemens
>
> On Wednesday, May 20, 2020 at 6:24:56 PM UTC+2, Ramos wrote:
>>
>> hello i´m using webfaction and this script
>>
>> https://github.com/duducosmos/webfaction-web2py-nginx-uwsgi-installer/blob/master/install.py
>>
>> that installed web2py a loong time ago.
>>
>> now i want to use python3.5.9 already available as python3 instead of
>> python 2.7
>>
>> i read this in the start conf
>>
>> #!/bin/bash
>>
>> # Start uwsgi
>> /home/ramstein74/webapps/new2py/bin/uwsgi   --uwsgi-socket
>> "/home/ramstein74/webapps/new2py/uwsgi.sock"
>>--master   --workers 1   --max-requests 1   --harakiri 60   
>> --daemonize /home/ramstein74/logs/user/uwsgi_new2py.log   --pidfile 
>> /home/ramstein74/webapps/new2py/uwsgi.pid   --vacuum   --chdir 
>> /home/ramstein74/webapps/new2py   --python-path 
>> /home/ramstein74/webapps/new2py/lib/python2.7   --wsgi-file 
>> /home/ramstein74/webapps/new2py/web2py/wsgihandler.py
>> # Start nginx
>> /home/ramstein74/webapps/new2py/bin/nginx
>>
>> changing python2.7 to python3 does not work.
>>
>> Any ideas would be awesome :)
>>
>> 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/c8ee09cc-ad06-43db-ac61-05700bc0297f%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/CAEM0BxNMSDF8%3DaE7ndb1Ahudai011DewXMCew6m-A4tBBYLd7g%40mail.gmail.com.


[web2py] Re: Webfaction anyone ??

2020-05-20 Thread António Ramos
Please delete this post. Already created another with a better subject :)

Em qua., 20 de mai. de 2020 às 17:15, António Ramos 
escreveu:

> hello i´m using webfaction and this script
>
> https://github.com/duducosmos/webfaction-web2py-nginx-uwsgi-installer/blob/master/install.py
>
> that installed web2py a loong time ago.
>
> now i want to use python3.5.9 already available as python3 instead of
> python 2.7
>
> i read this in the start conf
>
> #!/bin/bash
>
> # Start uwsgi
> /home/ramstein74/webapps/new2py/bin/uwsgi   --uwsgi-socket
> "/home/ramstein74/webapps/new2py/uwsgi.sock"
>--master   --workers 1   --max-requests 1   --harakiri 60   
> --daemonize /home/ramstein74/logs/user/uwsgi_new2py.log   --pidfile 
> /home/ramstein74/webapps/new2py/uwsgi.pid   --vacuum   --chdir 
> /home/ramstein74/webapps/new2py   --python-path 
> /home/ramstein74/webapps/new2py/lib/python2.7   --wsgi-file 
> /home/ramstein74/webapps/new2py/web2py/wsgihandler.py
> # Start nginx
> /home/ramstein74/webapps/new2py/bin/nginx
>
> changing python2.7 to python3 does not work.
>
> Any ideas would be awesome :)
>
> 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/CAEM0BxO449DBs--%3DBN0doHc_Y5pbyYsvbV7aK0E508_2Z4AL_g%40mail.gmail.com.


[web2py] uwsgi from python2.7 to python3

2020-05-20 Thread António Ramos
hello i´m using webfaction and this script
https://github.com/duducosmos/webfaction-web2py-nginx-uwsgi-installer/blob/master/install.py

that installed web2py a loong time ago.

now i want to use python3.5.9 already available as python3 instead of
python 2.7

i read this in the start conf

#!/bin/bash

# Start uwsgi
/home/ramstein74/webapps/new2py/bin/uwsgi   --uwsgi-socket
"/home/ramstein74/webapps/new2py/uwsgi.sock"
   --master   --workers 1   --max-requests 1   --harakiri 60
--daemonize /home/ramstein74/logs/user/uwsgi_new2py.log   --pidfile
/home/ramstein74/webapps/new2py/uwsgi.pid   --vacuum   --chdir
/home/ramstein74/webapps/new2py   --python-path
/home/ramstein74/webapps/new2py/lib/python2.7   --wsgi-file
/home/ramstein74/webapps/new2py/web2py/wsgihandler.py
# Start nginx
/home/ramstein74/webapps/new2py/bin/nginx

changing python2.7 to python3 does not work.

Any ideas would be awesome :)

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/CAEM0BxP1iygyngsChsBO5P2rZS-mGSD4ga%2BVuo%2BbjXK0Fcypaw%40mail.gmail.com.


[web2py] Webfaction anyone ??

2020-05-20 Thread António Ramos
hello i´m using webfaction and this script
https://github.com/duducosmos/webfaction-web2py-nginx-uwsgi-installer/blob/master/install.py

that installed web2py a loong time ago.

now i want to use python3.5.9 already available as python3 instead of
python 2.7

i read this in the start conf

#!/bin/bash

# Start uwsgi
/home/ramstein74/webapps/new2py/bin/uwsgi   --uwsgi-socket
"/home/ramstein74/webapps/new2py/uwsgi.sock"
   --master   --workers 1   --max-requests 1   --harakiri 60
--daemonize /home/ramstein74/logs/user/uwsgi_new2py.log   --pidfile
/home/ramstein74/webapps/new2py/uwsgi.pid   --vacuum   --chdir
/home/ramstein74/webapps/new2py   --python-path
/home/ramstein74/webapps/new2py/lib/python2.7   --wsgi-file
/home/ramstein74/webapps/new2py/web2py/wsgihandler.py
# Start nginx
/home/ramstein74/webapps/new2py/bin/nginx

changing python2.7 to python3 does not work.

Any ideas would be awesome :)

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/CAEM0BxOHNzcuoP1xgGNkXc78oyRHNcC_VwG8s0%3Dj_mHdCHJudA%40mail.gmail.com.


[web2py] CON Abandoned framework with (almost) no community

2020-05-17 Thread António Ramos
How is that possible ?
https://www.slant.co/versus/1397/1746/~web2py_vs_django
I´m here and many others are here...
Who is trying to make us look like dead people ??

Regards to you all :)

-- 
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/CAEM0BxPiBP5fh3uzUZMx2rtV44x%2BRoLet7UKogjsx5JixmdKug%40mail.gmail.com.


[web2py] ideas we stole and ideas we had . Slides not available ??

2020-05-13 Thread António Ramos
Can someone share the slides please ?
https://pycon-2012-notes.readthedocs.io/en/latest/web2py.html

maybe add it to the documentation..

http://www.web2py.com/init/default/documentation

regards
antónio

-- 
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/CAEM0BxMDu8q8grh-M1SrJK-uFPCgtvvRyZ0onUs-znfDA7UzWw%40mail.gmail.com.


[web2py] Off topic : new js alternative to vue and react

2020-05-07 Thread António Ramos
This is s cool and clean.
https://www.imba.io/
The interactive screencasting platform Scrimba.com  is
written in Imba, both frontend and backend.

regards
António

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


Re: [web2py] Re: py4wb simplification

2020-05-07 Thread António Ramos
With this callback can i have "powerfields" that automatically update
themselves in the database ?
No need to submit forms..

Em sáb., 15 de fev. de 2020 às 11:27, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> They they should be added
>
> @autneticated and @unauthenticated are defined in common.py
>
>
> The @unauthenticated  decorator automatically applys fixtures: db, auth,
> session, T. exposes the action with user /{function_name} and defaults to
> template {function_name}.html (very much like web2py does)
>
> @authenticated is the same but requires login.
>
> @authenticated.button("click me")
> def f(a,b,c): print(a,b,c)
>
> crate a button factory f which you can embed in code with [[=f(1,2,3)]] it
> generates a click me than when clicked
> calls via ajax POST the function f defined in python and passes a=1, b=2,
> c=3.
>
> Notice that this API is still work in progress. Works but it is not
> documented because we may change it.
>
> Comments?
>
>
>
>
> On Thursday, 13 February 2020 14:50:17 UTC-8, Luca wrote:
>>
>> What do @authenticated and @unauthenticated do?
>> Can they be added to the documentation?
>>
>> In particular I don't understand
>>
>> # define a button that make the following serverside POST callback
>> @unauthenticated.button("click me")
>> def a_button(msg):
>> print("you clicked the button and server received:", msg)
>>
>> Thanks!
>>
>> Luca
>>
>>
>>
>> Luca
>>
>> On Friday, January 31, 2020 at 8:55:11 PM UTC-8, Massimo Di Pierro wrote:
>>>
>>> I committed some new code to py4web
>>>
>>> Now you can do:
>>>
>>> from . common import authenticated, unauthenticated # from latest
>>> _scaffold
>>>
>>> # exposes index as /{app_name}/index and uses index.html or generic.html
>>> template, auth.user, db, T, session
>>> @authenticated()
>>> def index():
>>>   return dict()
>>>
>>> # GET only
>>> @authenticated.get()
>>> def index():
>>>   return dict()
>>>
>>> # exposes /{app_name}/index///
>>> @authenticated.get()
>>> def index(a,b,c):
>>>   return dict()
>>>
>>> # more explicit
>>> @authenticated.get("index///)
>>> def index(a,b,c):
>>>   return dict()
>>>
>>> Some magic
>>>
>>> # define a button that make the following serverside POST callback
>>> @unauthenticated.button("click me")
>>> def a_button(msg):
>>> print("you clicked the button and server received:", msg)
>>>
>>> # expose a page that displays the button which - onclick - makes the
>>> ballback
>>> @unauthenticated.get()
>>> def show_a_button():
>>> return dict(mybutton = a_button(msg="hello world"))
>>>
>>> Thoughts? Should we keep this API? Can we improve 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/4951fa88-e18e-46e9-a1e0-95adcb52f179%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/CAEM0BxPzHxcpwWPaU_JfUXBOJwT-yGDJuMZQc725-K5pK%2B%3DA1g%40mail.gmail.com.


Re: [web2py] Re: tailwindcss with web2py ?

2020-03-22 Thread António Ramos
from the creator

https://tailwindcss.com/course/setting-up-tailwind-and-postcss

Em sáb., 21 de mar. de 2020 às 12:34, António Ramos 
escreveu:

> I´m just looking into it but after the start barrier it seems that it
> give more freedom of creation over bootstrap.
> We just have to learn the utility classes 
>
>
>
> https://blog.logrocket.com/tailwind-css-is-it-tomorrows-bootstrap-ebe560f9d00b/
>
>
> https://dev.to/lauragift21/love-at-second-sight-with-tailwindcss-23dc
>
>
> Em sáb., 21 de mar. de 2020 às 07:08, Massimo Di Pierro <
> massimo.dipie...@gmail.com> escreveu:
>
>> The barrier of entry seems pretty high. What do you like about it?
>>
>> On Friday, 20 March 2020 04:37:23 UTC-7, Ramos wrote:
>>>
>>> any thoughts about tailwindcss ?
>>>
>>> Seems to me that could be the best option for web2py as it is very
>>> programable as we all like :)
>>>
>>> just one nice thing i like...
>>> https://tailwindcss.com/docs/extracting-components
>>>
>> --
>> 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/0acd12fc-b296-453e-831c-41bd44951ce6%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/0acd12fc-b296-453e-831c-41bd44951ce6%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAEM0BxP0EEYy0DHk3M%3DcUYNgTN5uDo1ehz0vik%3DtG%3D52_TTHhA%40mail.gmail.com.


Re: [web2py] Re: tailwindcss with web2py ?

2020-03-21 Thread António Ramos
I´m just looking into it but after the start barrier it seems that it
give more freedom of creation over bootstrap.
We just have to learn the utility classes 


https://blog.logrocket.com/tailwind-css-is-it-tomorrows-bootstrap-ebe560f9d00b/


https://dev.to/lauragift21/love-at-second-sight-with-tailwindcss-23dc


Em sáb., 21 de mar. de 2020 às 07:08, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> The barrier of entry seems pretty high. What do you like about it?
>
> On Friday, 20 March 2020 04:37:23 UTC-7, Ramos wrote:
>>
>> any thoughts about tailwindcss ?
>>
>> Seems to me that could be the best option for web2py as it is very
>> programable as we all like :)
>>
>> just one nice thing i like...
>> https://tailwindcss.com/docs/extracting-components
>>
> --
> 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/0acd12fc-b296-453e-831c-41bd44951ce6%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/CAEM0BxNcniwK5eJavfkdqrM%3DydEOOOCdz-tUPqsmhfkfTNsPPg%40mail.gmail.com.


[web2py] tailwindcss with web2py ?

2020-03-20 Thread António Ramos
any thoughts about tailwindcss ?

Seems to me that could be the best option for web2py as it is very
programable as we all like :)

just one nice thing i like...
https://tailwindcss.com/docs/extracting-components

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


Re: [web2py] Fullcalendar v4 and web2py

2020-03-16 Thread António Ramos
{{response.files.append(URL(r=request,c='static/js',f='fullcalendar.min.js'))}}
{{response.files.append(URL(r=request,c='static/css',f='fullcalendar.min.css'))}}
{{extend 'layout.html'}}


.myclass{
background-color: white;

}
#calendar .fc-agenda-axis, #calendar .fc-widget-header {
  background-color: #C2E6FF;
  border-color: #AED0EA;
  font-weight: normal;
  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;

  border-radius: 3px ;
}
#calendar .fc-event {
  box-shadow: 2px 2px 2px #706868;

}
.fc-today {
   background-color: #C2E6FF;
}
.fc-day-number {
font-size: 14px;
}
.fc-content{
text-align:right ;
cursor:pointer;
}
.fc h2 {
   font-size: 20px;
}
.fc-scroller {
   overflow-y: hidden !important;
}



$(document).ready(function() {

var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();

$('#calendar').fullCalendar({
firstDay:1,
displayEventTime:true,
monthNames:
["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho",
"Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" ],
monthNamesShort:
['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
   dayNames: [ 'Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta',
'Sexta', 'Sábado'],
   dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
   buttonText: {
today: 'hoje',
month: 'mês',
week: 'semana',
day: 'dia'
   },
header:{
  left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay',


},
eventClick: function(info) {
alert('Event: ' + info.event.title);
alert('Coordinates: ' + info.jsEvent.pageX + ',' + info.jsEvent.pageY);
alert('View: ' + info.view.type);

// change the border color just for fun
info.el.style.borderColor = 'red';
  },
  dayClick: function(date, jsEvent, view) {
$("#inicio").val(date.format()+"T09:00");
$("#fim").val(date.format()+"T18:00");

},
editable: false,
defaultView:'month',
displayEventTime: true,
displayEventEnd:true,
  eventClick: function(event) {
console.log(event);
if (event.url) {
window.open(event.url, "_blank");
return false;
}
},
height: "auto",
events: [
{{for task in ret:}}

   {{color='#f00'}}

{
{{temp=db.auth_user(id=task["person"])}}
title: '{{=temp["nick"]}}\n

{{=task["description"]}}', color : '{{=color}}', textColor:"#FFF", start:'{{=task["eventstart"]}}', end: '{{=task["eventend"]}}', }, {{pass}} ], eventRender: function( event, element, view ) { var title = element .find('.fc-title, .fc-list-item-title'); title.html(title.text()); }, }); }); {{=form}} Em dom., 15 de mar. de 2020 às 17:46, Andrea Fae' escreveu: > Anyone have any eocumentation with a examples about using Fullcalendar.io > v4 javascript calendar with web2py? > thank you > > -- > 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/113d00b6-37b0-4bcc-8185-4863be823ae4%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/CAEM0BxNCyZRBAZRtQ08AxSRBjhh6jQ-zWCZrOF0LdLG0acY%3Dqw%40mail.gmail.com.

Re: [web2py] DId.app auth is good for web2py apps ?

2020-03-11 Thread António Ramos
Thank you Kevin , please share...


Em qua., 11 de mar. de 2020 às 14:53, Kevin Keller 
escreveu:

> Looks nice enough, though it is missing an easy way to configure scopes
> and claims.
>
> It dont see it anywhere in their free account actually.
>
> I would probably rather advice to go with Auth0 or Okta.
>
> I work for Okta so that is why I have integrated web2py with Okta in a
> sample app.
> I can send you the configuration and they have a free edition too for 1000
> users per month just like
> DID and you can easily configure claims and scopes.
>
> If you do not trust me on this go with Auth0, they can also help with
> claims and scopes and I think
> its free for 1000 users too, but Auth0 requires to do some scripting to
> configure your scopes on the Auth0 web client.
>
> So I think Okta is easier, but its just my 2 cents of course.
>
>
>
>
> On Wed, Mar 11, 2020 at 2:02 PM António Ramos 
> wrote:
>
>> DID <https://did.app/> is an Identity Provider, that authenticates users
>> by verifying access to either an email address or securely stored private
>> key.
>>
>> This gives users the ability to sign in with a single click without being
>> tracked by the social login providers.
>>
>> It gives developers the ability to offer a modern authentication without
>> having to handle validating signatures, recovering accounts from lost
>> devices or verifying user email addresses.
>>
>>
>>
>> https://did.app/
>>
>>
>> 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/CAEM0BxO8Gv%2BcJY-o_WXFEkEBMEFRA-WiPknUASOR7gXGzrKvAw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/web2py/CAEM0BxO8Gv%2BcJY-o_WXFEkEBMEFRA-WiPknUASOR7gXGzrKvAw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CADHCKLSOTzGdYe8UV7J%3DC4Pq_BU7ia61Z%2BHbJH2ryj%2BWTxS6ig%40mail.gmail.com
> <https://groups.google.com/d/msgid/web2py/CADHCKLSOTzGdYe8UV7J%3DC4Pq_BU7ia61Z%2BHbJH2ryj%2BWTxS6ig%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAEM0BxNOiKMR1W3F21v-2AWNB0RYDm%2B%2BQNGD1dn%2BTXXbhMMr9Q%40mail.gmail.com.


[web2py] DId.app auth is good for web2py apps ?

2020-03-11 Thread António Ramos
DID  is an Identity Provider, that authenticates users by
verifying access to either an email address or securely stored private key.

This gives users the ability to sign in with a single click without being
tracked by the social login providers.

It gives developers the ability to offer a modern authentication without
having to handle validating signatures, recovering accounts from lost
devices or verifying user email addresses.



https://did.app/


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/CAEM0BxO8Gv%2BcJY-o_WXFEkEBMEFRA-WiPknUASOR7gXGzrKvAw%40mail.gmail.com.


[web2py] Tip on declaring tables

2020-03-05 Thread António Ramos
Hello just wondering if declaring a variable for each table is of any
concern in the context of many tables and many controllers and models.
Regards
EquipArea = db.define_table(app+'area',
Field('nome', 'string', length=35, requires=IS_NOT_EMPTY()),
Field('descricao','string',label ='Descrição',length=155),
Field('outros','string', length=255),
Field('empresa', 'reference ' + app + 'empresa', label='Empresa'),
format = '%(nome)s:%(descricao)s' )

-- 
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/CAEM0BxNur7s3u4m%3DEkMSFMEzxnAoLy6wumi5rS%3Dvn6G7UpiAWA%40mail.gmail.com.


Re: [web2py] Re: off topic - Alpine JS as an alternative to vuejs/react

2020-02-28 Thread António Ramos
maybe this is helpful

https://www.alpinetoolbox.com/

Em sex., 28 de fev. de 2020 às 06:19, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> wow. Alpine is pretty good. I will give it a try.
>
>
> On Monday, 24 February 2020 08:33:28 UTC-8, Ramos wrote:
>>
>> vuejs is awesome but for simple stuff maybe alpine js is simpler.
>> Just asking your thoughts if any...
>> https://github.com/alpinejs/alpine
>>
> --
> 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/3d1f9908-3313-4c80-a8d7-142b4dfbef93%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/CAEM0BxNbUM9-_GL7qbgOdVjzoy-YMGip%3DB-oRvQ_hVDpQC2a8Q%40mail.gmail.com.


Re: [web2py] Re: LOAD in py4web

2020-02-24 Thread António Ramos
I think LOAD should be gone and we should move this kind of interaction to
the client part.
Also py4web should stick with server stuff and let client stuff integrate
better an in a more independent way.
For me FORM / smartgrid should also be gone. Vuetify and buefy tables are
awesome. dont try to compete with that because your are competing with the
power of vuejs. Just ease the connection between the 2.
The problem i see with vuejs is working with vue components. Without the
need for vue components maybe a simpler tool like
https://github.com/alpinejs/alpine  should be enough



Regards
António




Em seg., 24 de fev. de 2020 às 06:31, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> We can add it in utils. But before we do. Do other peopl find it useful?
> Is that a pattern we should encourage vs, for example, vue.js?
>
> On Sunday, 23 February 2020 10:18:51 UTC-8, RHC wrote:
>>
>> HI,
>>
>> I am beginning to experiment with py4web, I like the sound of it and I am
>> looking to convert a web2py project to py4web to see how they compare.
>>
>> It appears that the LOAD (helper?) that was available in web2py templates
>> is not available in py4web. I was using this to populate part of a web
>> page, I liked the way you had the option to use LOAD to call a separate URL
>> (within the same app) and insert the result into your page before returning
>> the page to the client.
>>
>> What is the reason for the absence of LOAD in py4web? is there a
>> recommended alternative method of achieving the same effect? I have used a
>> mixture of ajax=True and ajax=False options for this feature.
>>
>> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/7cfaf6be-8be3-41dc-8745-ab59716f68af%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/CAEM0BxO6k7M-Yfk-r3Oc2B2zvScvxSQ%2BLC%3DXPtXWttSGnO0irA%40mail.gmail.com.


[web2py] off topic - Alpine JS as an alternative to vuejs/react

2020-02-24 Thread António Ramos
vuejs is awesome but for simple stuff maybe alpine js is simpler.
Just asking your thoughts if any...
https://github.com/alpinejs/alpine

-- 
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/CAEM0BxMgKVVLr%2BQN7ouJM7S_qYm-b1dmcYX-bAP3w0YxJE_tZA%40mail.gmail.com.


Re: [web2py] py4web jwt ?

2020-02-20 Thread António Ramos
getting this from py4web as an api.
[image: image.png]
Is not what i would like to see from a SPA standpoint.

Regards
António


Em qui., 20 de fev. de 2020 às 18:03, Val K  escreveu:

> It seems it depends on request.content_type
>
> https://github.com/web2py/py4web/blob/e6b3d5e10e15976af153c4a4e6b349a02fe6c2a9/py4web/utils/auth.py#L35
>
> --
> 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/9608a9ab-d338-4580-9d02-31b9b9a30782%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/CAEM0BxMwtYztWzkpacrh9zBdMhU3t1C7budbPu24NkdxXeThww%40mail.gmail.com.


[web2py] py4web jwt ?

2020-02-20 Thread António Ramos
this code  from the docs...

@action('index')
@action.uses(auth.user)def index():

return {"ok":1}

Here @action.uses(auth.user) tells py4web that this action requires a
logged in user and should redirect to login if no user is logged in.



this redirect is good for an full web2py app.

What if i have a SPA in vue ?

In case the user is not logged it it should not redirect to login page
because the apps is a outsider vue spa. How to return an error to vue spa ??

regards


António

-- 
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/CAEM0BxNvNyYjk40qBKoUVF6cpD1%3DQuBaBA4b2dD2Rck0emFHoA%40mail.gmail.com.


[web2py] pydal bug!

2020-02-20 Thread António Ramos
this is the result
[image: image.png]
of this code . Why do i get user ???
@action('colors')
@action.uses( session, db, T, auth.user)
def colors():

return {'colors': ['red', 'blue', 'green']}

-- 
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/CAEM0BxMg0MVC_3xGodGBOLEJ4djz-via6Yz%2Bj3_M8MbqX7F4cA%40mail.gmail.com.


[web2py] py4web

2020-02-20 Thread António Ramos
Any time i change controllers.py i have to stop and restart the server. why
??

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/CAEM0BxOYTMhZB1QkyX-dQsRMWX7h3jYzsbAcYzFnfDvwTnnQqw%40mail.gmail.com.


[web2py] buefy for bulma /py4web

2020-02-18 Thread António Ramos
py4web has bulma out of the box
so i guess buefy is more advisable than vuetify to use with py4web right ?

https://buefy.org/

-- 
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/CAEM0BxP%3DmSJSpChaQnisJcmQ%3DjaqmBKJXOH%3DTaMoFnch6C6M6w%40mail.gmail.com.


Re: [web2py] Re: PY4WEB socketIO

2020-02-18 Thread António Ramos
I was not expecting less than that from Massimo :)

Em ter., 18 de fev. de 2020 às 03:45, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> It would be trivial to implement it like flask does.
>
> You can do it right now using the bottlepy way:
> https://pypi.org/project/bottle-websocket/
> or
> https://github.com/marlboromoo/bottle-socketio-example
> py4web uses bottle under the hood.
>
> The problem is that I would like something better than that.
> I am not convinced it would work well in a cloud setting o when you have
> servers behind a load balancer.
>
> Imagine you have two chat clients connected to two servers. If your client
> posts a chat message, how does one server notify the other server to notify
> the other client? This is the hard problem to solve. I am not interests in
> toy examples. py4web will have this.
>
> Massimo
>
>
> On Monday, 17 February 2020 10:31:39 UTC-8, Ramos wrote:
>>
>> hello , just asking if py4web will have the ability like flask to have a
>> socket  as simple as ...
>> Regards
>>
>> @socketio.on('my event')def handle_my_custom_event(arg1, arg2, arg3):
>> print('received args: ' + arg1 + arg2 + arg3)
>>
>> --
> 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/dc01a0c6-dd54-4cab-a3c6-6073f95cd19d%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/CAEM0BxNNWP1XqqyYPDfOH34PNcw3PCO%2BWvVOQTm-L1Fe3K0WvQ%40mail.gmail.com.


[web2py] Re: PY4WEB socketIO

2020-02-17 Thread António Ramos
also rooms ...
https://flask-socketio.readthedocs.io/en/latest/

Em seg., 17 de fev. de 2020 às 18:31, António Ramos 
escreveu:

> hello , just asking if py4web will have the ability like flask to have a
> socket  as simple as ...
> Regards
>
> @socketio.on('my event')def handle_my_custom_event(arg1, arg2, arg3):
> print('received args: ' + arg1 + arg2 + arg3)
>
>

-- 
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/CAEM0BxML9Yicb5D7cSYM33B_gfedt0%3DJmzBcG%2BAZsnBAxskDCQ%40mail.gmail.com.


[web2py] PY4WEB socketIO

2020-02-17 Thread António Ramos
hello , just asking if py4web will have the ability like flask to have a
socket  as simple as ...
Regards

@socketio.on('my event')def handle_my_custom_event(arg1, arg2, arg3):
print('received args: ' + arg1 + arg2 + arg3)

-- 
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/CAEM0BxPq1SDn0VNsbLshEmSRij1qde3gy%3D53zMphjw-McU55_w%40mail.gmail.com.


Re: [web2py] Re: web2py/py4web HTML helpers as an independent module

2020-02-15 Thread António Ramos
Nice to know!!

Massimo Di Pierro  escreveu em sáb, 15/02/2020
às 11:29 :

> pip install yatl
> python
> >>> from yatl.helpers import A, BUTTON, DIV
>
> enjoy. This has been possible for some time.
>
> On Friday, 14 February 2020 04:35:41 UTC-8, Ramos wrote:
>>
>> Hello, like pydal that is now an independent module , would also be
>> interesting to have web2py HTML helpers imported as a independent module
>> outside of web2py.
>> Maybe flask and django developers could use them also...
>> Regards
>> António
>>
> --
> 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/551a2ad9-438d-4dca-9919-299a858d8649%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/CAEM0BxMV5uWCEr3SfnQA4vjaUGXOBO0HFAK7db46V91ebQYM3Q%40mail.gmail.com.


[web2py] web2py/py4web HTML helpers as an independent module

2020-02-14 Thread António Ramos
Hello, like pydal that is now an independent module , would also be
interesting to have web2py HTML helpers imported as a independent module
outside of web2py.
Maybe flask and django developers could use them also...
Regards
António

-- 
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/CAEM0BxP2ViXH90D2PGBbyMpDCcaa_n-B47xTSHBhYkdetw%3DqTw%40mail.gmail.com.


Re: [web2py] Re: special chars in view, utf8 issue ?!

2020-02-13 Thread António Ramos
my solution   .decode('utf8').encode('latin1')
just did it without thinking... dont know what i´m doing but it works...

  {{temp=db(db.apps.id>0).select(db.apps.icon,db.apps.
url,db.apps.bg,db.apps.title,orderby=db.apps.id)}}
  {{for x in temp:}}
  {{=XML({"url":x["url"],"icon":x["icon"],"title":x[
'title'].decode('utf8').encode('latin1'),"bg":x["bg"]}) }},
  {{pass}}

Em qua., 12 de fev. de 2020 às 13:19, Clemens <
clemens.odend...@claret-clover.de> escreveu:

> Hello Ramos,
>
> since I can't see your screenshot, I have to guess. But in German we also
> our special characters and I encode these by the following procedure:
>
> import re
>> import sys
>>
>> def convert_special_chars(label):
>> if sys.version_info[0]==2: # python 2.x
>> label = label.decode('utf-8')
>> label = cgi.escape(label)
>> label = label.encode('ascii', 'xmlcharrefreplace')
>>
>> return label
>>
>
> Have a try! Hope it helps!
>
> Best regards
> Clemens
>
>
> On Wednesday, February 12, 2020 at 12:12:41 PM UTC+1, Ramos wrote:
>>
>> Hello i cant understand how to solve this issue.
>> I have a record with portuguese characters
>> "Ações de cada um" that passing it to  the view results in a different
>> value.
>> How do i understand it to solve it ?
>>
>> [image: image.png]
>> This is the result in my view
>> My layout has  
>> and my view is just
>>
>> {{=a}}
>>
>> [image: image.png]
>> and this is my controller
>> # -*- coding: utf-8 -*-
>> def execdal():
>>
>> ret=[]
>> a=db(db.apps.id==1).select(db.apps.icon,db.apps.url,db.apps.bg
>> ,db.apps.title,orderby=db.apps.id).as_list()
>> return dict(a=a)
>>
> --
> 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/b63a8e8e-717a-41e7-b2fd-476dae50ebed%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/CAEM0BxNkSBUm92np%3DPGj_6AUQ36s01xbSrBdGN8P%3Ddyn-aTpJg%40mail.gmail.com.


[web2py] Re: cannot reference db.auth_group in model ?

2020-02-12 Thread António Ramos
problem solved.
Forgot to add "*list:*reference auth_group"

regards
António

Em qua., 12 de fev. de 2020 às 11:31, António Ramos 
escreveu:

> any help ?
> thank you
>
> Em qua., 12 de fev. de 2020 às 11:31, António Ramos 
> escreveu:
>
>> correct model
>> db.define_table("apps",
>> Field("title"),
>> Field("icon"),
>> Field("bg"),
>> Field("url"),
>> format='%(title)s'
>> )
>> db.define_table('menus',
>> Field("visibleTo",'reference auth_group'),
>> Field("app",'reference apps'),
>> Field('content','list:string'),
>> Field('icon'),
>> Field('href'),
>> Field('indice')
>> )
>> db.menus.visibleTo.requires=IS_IN_DB(db,db.auth_group.id,'%(role)s',
>> multiple=True)
>>
>> Em qua., 12 de fev. de 2020 às 11:30, António Ramos 
>> escreveu:
>>
>>> Hello all i have a problem relating a record to auth_group records
>>>
>>> creating in admin a new record in table menus, referencing one or more
>>> auth_group record results in a record with None in visibleTo field.
>>> Why ?
>>> [image: image.png]
>>> db.define_table("apps",
>>> Field("title"),
>>> Field("icon"),
>>> Field("bg"),
>>> Field("url"),
>>> format='%(title)s'
>>> )
>>> db.define_table('menus',
>>> Field("visibleTo",'reference auth_group'),
>>> Field("app",'reference apps'),
>>> Field('content','list:string'),
>>> Field('icon'),
>>> Field('href'),
>>> Field('indice')
>>> )
>>> db.menus.visibleTo.requires=IS_IN_DB(db,db.auth_group.id,'%(role)s',
>>> multiple=True)
>>> Field('href'),
>>> Field('indice')
>>> )
>>>
>>

-- 
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/CAEM0BxNkiap2CHw7SCR-HH_YqShWYYsYuAfN2nSvmVYaXcHQPQ%40mail.gmail.com.


[web2py] Re: cannot reference db.auth_group in model ?

2020-02-12 Thread António Ramos
correct model
db.define_table("apps",
Field("title"),
Field("icon"),
Field("bg"),
Field("url"),
format='%(title)s'
)
db.define_table('menus',
Field("visibleTo",'reference auth_group'),
Field("app",'reference apps'),
Field('content','list:string'),
Field('icon'),
Field('href'),
Field('indice')
)
db.menus.visibleTo.requires=IS_IN_DB(db,db.auth_group.id,'%(role)s',multiple
=True)

Em qua., 12 de fev. de 2020 às 11:30, António Ramos 
escreveu:

> Hello all i have a problem relating a record to auth_group records
>
> creating in admin a new record in table menus, referencing one or more
> auth_group record results in a record with None in visibleTo field.
> Why ?
> [image: image.png]
> db.define_table("apps",
> Field("title"),
> Field("icon"),
> Field("bg"),
> Field("url"),
> format='%(title)s'
> )
> db.define_table('menus',
> Field("visibleTo",'reference auth_group'),
> Field("app",'reference apps'),
> Field('content','list:string'),
> Field('icon'),
> Field('href'),
> Field('indice')
> )
> db.menus.visibleTo.requires=IS_IN_DB(db,db.auth_group.id,'%(role)s',
> multiple=True)
> Field('href'),
> Field('indice')
> )
>

-- 
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/CAEM0BxNcNKk%3DxXXeFeGx9Q8Gu5brxSLSpAGhAoZF0D4_MbjZhw%40mail.gmail.com.


  1   2   3   4   5   6   7   8   9   10   >