[web2py] Network Protocol Violation Error on my web2py apps

2020-11-16 Thread mostwanted

Guys lately my applications have been experiencing this error when opening:


*The site at https://www.this_site.com/init/default/business_registration 
has experienced a network protocol violation that cannot be repaired. *

This error shows in pages where users have to login, also forms do not 
submit details after being filled up! Is it just me or others are 
experiencing the same thing? Is there is something wrong in my code that 
needs to be fixed? 

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/8b0d767a-df9c-4e2b-afa1-82cb42571087n%40googlegroups.com.


Re: [web2py] Re: Push Notifications

2020-11-16 Thread mostwanted
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/df9d944b-aecc-493d-91a9-b0802987d752n%40googlegroups.com.


Re: [web2py] Re: Push Notifications

2020-11-16 Thread AGRogers
Thanks for the tip Antonio. The free version could work well for me. I dont
mind reinventing the wheel - I just dont like fixing it when it breaks :)

___
*www.TenOutOfTen.org* 
rogers...@gmail.com
(+95) 09 250018669 (Myanmar)



On Tue, 17 Nov 2020 at 09:05, António 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+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
> 
> .
>

-- 
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/CACWMBMPyL3L%2BS0YFwVG93GC6EnQ-wSwR_8eiypvk2JznEcsy9w%40mail.gmail.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] Redirect from web2py to flask only if user is logged in

2020-11-16 Thread clara
Hello, 

First of all , I want to thank for the helpful answers that I get every 
time I post a question in this group. 

Now, I have a question, I am not sure if what I am trying to do is feasible 
or not:

I have apache running with 2 virtual hosts:

- Virtual Host 1 runs Web2py with Google OAuth2 

- Virtual Host 2 runs Flask based applications with no login

Can I somehow use Web2py to authorize logged in users into the Virtual Host 
2 ?
And disallow not logged in users into Virtual Host 2, that is, prevent the 
direct link to virtual host 2 URL from being accessed if not coming from 
web2py.

This is more of a sysadmin question, but if someone can give me some hint 
on this, I would really appreciate it. 

Thanks,

Clara




-- 
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/9ef06676-d13d-4941-a618-7b71bcf050b8n%40googlegroups.com.


Re: [web2py] PostgreSQL - column "COLUMN" must appear in the GROUP BY clause or be used in an aggregate function LINE 1:

2020-11-16 Thread villas
Usually, you would only require GROUP BY if you were trying to calculate an 
aggregate function such as the SUM, COUNT, AVG etc on a column.  
In this case, you are not specifying any such function, so it is unclear 
what you are trying to do.
Perhaps you are simply trying to express an ORDER BY?  In any case, I 
suspect it would be best if you read and learn a little more about SQL.  

BTW I have noticed, in particular,  that MySQL and sqllite are extremely 
forgiving when users specify non-standard SQL commands and you cannot rely 
on or expect such permissive behaviour across all DB engines.

Best wishes.

On Sunday, 15 November 2020 at 08:18:55 UTC ermolaev...@gmail.com wrote:

> for grp in db((db.pay_ins_stack.ref_==db.pay_ins.id)
> & (db.pay_ins.ref_ == db.deal_acc_addrs.id )
> & (db.deal_acc_addrs.xcurr_id == xcurr.id)
> ).select(groupby=(db.deal_acc_addrs.id, 
> db.pay_ins_stack.id)):
>
> same error:
> column "pay_ins.id" must appear in the GROUP BY clause or be used in an 
> aggregate function LINE 1: ..._ins_stack"."tries", 
> "pay_ins_stack"."to_refuse", "pay_ins" ^  
>
> суббота, 14 ноября 2020 г. в 12:32:08 UTC+3, kell...@gmail.com: 
>
>> I think @Leonel Câmara would know best what is going on here.
>>
>> My uneducated guess is that you are using Postgresql12 and that there 
>> were some major changes from postgres11 to postgres12.
>> Either Pydal has not caught up yet, or since pydal is not strictly an 
>> ORM, you just have to actually adapt your pydal statements a bit. 
>>
>> Try this: 
>>
>> for grp in db((db.pay_ins_stack.ref_==db.pay_ins.id)
>> & (db.pay_ins.ref_ == db.deal_acc_addrs.id )
>> & (db.deal_acc_addrs.xcurr_id == xcurr.id)
>> ).select(groupby=(db.deal_acc_addrs.id), 
>> pay_ins_stack.id):
>>
>>
>>
>> Am Sa., 14. Nov. 2020 um 09:35 Uhr schrieb Dmitrii Ermolaev <
>> ermolaev...@gmail.com>:
>>
>>>
>>> for grp in db((db.pay_ins_stack.ref_==db.pay_ins.id)
>>> & (db.pay_ins.ref_ == db.deal_acc_addrs.id )
>>> & (db.deal_acc_addrs.xcurr_id == xcurr.id)
>>> ).select(groupby=(db.deal_acc_addrs.id)):
>>>
>>> ERROR:
>>> column "pay_ins_stack.id" must appear in the GROUP BY clause or be used 
>>> in an aggregate function LINE 1: SELECT "pay_ins_stack"."id", 
>>> "pay_ins_stack"."ref_", "pay_in...  
>>>
>>> With MySQL all work good !
>>>
>>> help please!
>>>
>>> -- 
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/c392a3bc-f748-468a-b74c-5c15fef6d20fn%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/4ff387af-49ac-44fe-8786-82b7bb8e1fa0n%40googlegroups.com.


[web2py] Where to find Alert/Flash messages

2020-11-16 Thread Brennie Standy
I have a ticket where our client wishes to see a list of all 
flash/alert/error messages, including anything from "Logged in" to our own 
customized error messages set by the previous developer. Where in the app 
can I find this list? Standard global search is not proving useful. 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/b447d3c3-987d-4d59-a790-2dacf04f2fe6n%40googlegroups.com.


[web2py] Re: Push Notifications

2020-11-16 Thread mostwanted
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.


[web2py] Push Notifications

2020-11-16 Thread mostwanted

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/34bc7771-9a47-44c5-86f6-5278eded59f7n%40googlegroups.com.


[web2py] Push Notifications

2020-11-16 Thread mostwanted
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.

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/839ec8da-c37a-473b-899b-0ae9c1d95e51n%40googlegroups.com.