Re: [web2py] Re: Web3py

2019-06-09 Thread Massimo Di Pierro
please try delete everything in apps/_scaffold/databases/* I was not able 
to reproduce after I did that

On Sunday, 9 June 2019 01:23:08 UTC-7, John Bannister wrote:
>
> I tried  both with and without. Same or very similar result. It is only 
> complaining about the auth_user_tag table which is defined in the auth 
> module.
>
>  
>
> *From:* web2py@googlegroups.com [mailto:web2py@googlegroups.com] *On 
> Behalf Of *Massimo Di Pierro
> *Sent:* 08 June 2019 07:19
> *To:* web2py-users
> *Subject:* [web2py] Re: Web3py
>
>  
>
> try a db.commit() after your define_table(s).
>
> On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote:
>
> Hi All,
>
>  
>
> Finally gotten round to playing again on the latest Web3py.
>
>  
>
> On _scaffold app .. if I add new tables to model file and then reload from 
> the dashboard .. I get errors as follows:-
>
> File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
> define_table
>
> raise SyntaxError('table already defined: %s' % tablename)
>
>   File "", line None
>
> SyntaxError: table already defined: auth_user_tag_groups
>
> Only way around it seems to be to delete contents of database folder and 
> restart.
>
>  
>
> Dashboard app hangs on reload sometimes (I think it has to do the with 
> same issue above) and only way to get round it is to restart the server and 
> refresh the _dashboard app. 
>
>  
>
> I really want to start using it to create a few new apps I am due to start 
> working on shortly even though I am well aware that it is not yet 
> production ready so will keep testing and assist wherever I can. Thanks 
> again for all the hard work put in so far I am sure its gonna be a really 
> cool solution.
>
>  
>
> Best Regards
>
> John
>
>  
>
>  
>
> On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:
>
> Hi All,
>
>  
>
> Had a first real 'play' with web3py' today and have a few questions the 
> biggest of which I am hoping the gurus will be able to answer:-
>
>  
>
> 1: Is there any way to not to have to restart the app every time changes 
> are made to actions in the controller or new actions added etc? I 
> understand that controllers are basically being imported when the app fires 
> up but is any there any way to occasionally reload instead of having to 
> restart the app? This is a fairly big one for me as sometimes tweaks will 
> need to be made in production and restarting the web server is not really 
> an option so hopefully I am missing something really simple.
>
>  
>
> Thanks in advance
>
> John
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>   
>
> -- 
> 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/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2f98fc4f-6d91-4393-bc33-5b2a82f57a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-06-09 Thread 黄祥
*http://localhost:8000/examples/dbform*
*error on browser*
500
INTERNAL SERVER ERROR

*error on terminal*
ERROR:root:Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in 
wrapper
ret = func(*func_args, **func_kwargs)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 381, in 
wrapper
ret = obj.transform(ret)
  File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 213, in 
transform
delimiters=self.delimiters, reader=Template.reader)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/template.py"
, line 968, in render
exec(code, context)
  File "", line 2, in 
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/yatl/template.py"
, line 831, in write
data = data.xml()
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 245, 
in xml
return self.helper().xml()
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 235, 
in helper
self.deletable)
  File "/Users/sugizo/learn/python/web3py/web3py/utils/form.py", line 59, in 
FormStyleDefault
key = control.name.rstrip('/')
AttributeError: 'str' object has no attribute 'name'

*didnt have form validation*
http://localhost:8000/todo/index
http://localhost:8000/_scaffold/auth/login
http://localhost:8000/_scaffold/auth/request_reset_password

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8b97cb69-5449-4f3c-bc97-c12473584f86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] recaptcha language settings How ?

2019-06-09 Thread icodk
How to set  reCaptcha2 language ?
I tried with the options parameter but got an error that the nl parameter 
is not recognized
form.element('table').insert(-1, TR('' ,Recaptcha2(request, 'PUBLIC_KEY', 
'PRIVATE_KEY',options={nl:'da'})))

Looking into the reCaptcha2 class definition  I can see referance to nl but 
can't figure out how to implement it so it works

google reference :
https://developers.google.com/recaptcha/docs/display#config

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/fda7f21d-2249-4dfd-8f93-a62b3c0f9f45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] A schedule automatic delete from Database

2019-06-09 Thread Lovedie JC
import datetime

yesterday = request.now - datetime.timedelta(days=1)
db(db.post.modified_on < yesterday).delete()

I hope this helps. You can work around it but worked for me in deleting
previous posts up to the previous date. You don't have to manually delete
but works automatically.
Regards

On Sun, 9 Jun 2019 at 12:41, Lovedie JC  wrote:

> Had one, let check my archives.
>
> On Sun, 9 Jun 2019, 09:47 mostwanted  wrote:
>
>> Is there a way to schedule an automatic deleting of content from database
>> on a specified date? I have an application that I want  to delete posts
>> when we reach specified dates. If anyone is familiar with this, your
>> assistance would be greatly appreciated.
>>
>> 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/bd76a193-c425-43ca-8a7b-157bd137b860%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAcHJF_x2me%3DkaWTVpexMRcsvKbt6F_Dxbq6bST76nWhgkeEVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] A schedule automatic delete from Database

2019-06-09 Thread Lovedie JC
Had one, let check my archives.

On Sun, 9 Jun 2019, 09:47 mostwanted  wrote:

> Is there a way to schedule an automatic deleting of content from database
> on a specified date? I have an application that I want  to delete posts
> when we reach specified dates. If anyone is familiar with this, your
> assistance would be greatly appreciated.
>
> 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/bd76a193-c425-43ca-8a7b-157bd137b860%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAcHJF_tFDmbv-ABFrDMsxE0Q0TvDpQrxLtY27BKZhewXaQzYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: [web2py] Re: Web3py

2019-06-09 Thread John Bannister
I tried  both with and without. Same or very similar result. It is only 
complaining about the auth_user_tag table which is defined in the auth module.

 

From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of 
Massimo Di Pierro
Sent: 08 June 2019 07:19
To: web2py-users
Subject: [web2py] Re: Web3py

 

try a db.commit() after your define_table(s).

On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote:

Hi All,

 

Finally gotten round to playing again on the latest Web3py.

 

On _scaffold app .. if I add new tables to model file and then reload from the 
dashboard .. I get errors as follows:-

File "C:\Users\johhb\py3\lib\site-packages\pydal\base.py", line 581, in 
define_table
raise SyntaxError('table already defined: %s' % tablename)
  File "", line None
SyntaxError: table already defined: auth_user_tag_groups

Only way around it seems to be to delete contents of database folder and 
restart.

 

Dashboard app hangs on reload sometimes (I think it has to do the with same 
issue above) and only way to get round it is to restart the server and refresh 
the _dashboard app. 

 

I really want to start using it to create a few new apps I am due to start 
working on shortly even though I am well aware that it is not yet production 
ready so will keep testing and assist wherever I can. Thanks again for all the 
hard work put in so far I am sure its gonna be a really cool solution.

 

Best Regards

John

 

 

On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote:

Hi All,

 

Had a first real 'play' with web3py' today and have a few questions the biggest 
of which I am hoping the gurus will be able to answer:-

 

1: Is there any way to not to have to restart the app every time changes are 
made to actions in the controller or new actions added etc? I understand that 
controllers are basically being imported when the app fires up but is any there 
any way to occasionally reload instead of having to restart the app? This is a 
fairly big one for me as sometimes tweaks will need to be made in production 
and restarting the web server is not really an option so hopefully I am missing 
something really simple.

 

Thanks in advance

John

 

 

 

 

 

 

  

-- 
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/33476d6d-05dd-4452-a67b-e919b06d08b6%40googlegroups.com
 

 .
For more options, visit https://groups.google.com/d/optout.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/00d501d51e9c%248f360030%24ada20090%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] A schedule automatic delete from Database

2019-06-09 Thread mostwanted
Is there a way to schedule an automatic deleting of content from database 
on a specified date? I have an application that I want  to delete posts 
when we reach specified dates. If anyone is familiar with this, your 
assistance would be greatly appreciated.

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/bd76a193-c425-43ca-8a7b-157bd137b860%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.