[web2py] Py4web readonly Form

2020-03-06 Thread John Bannister
Hi All,

I have been testing Py4web and have the following to produce basically a 
'view record' option :-

def view_test():
form=Form(db.auth_user, record=1, readonly=True, deletable=False, 
formstyle=FormStyleBulma)
if form.accepted:
redirect(URL('index'))
return dict(form=form)

This will redirect if I remove the readonly=True from the form but 
basically form is just displayed (all fields are readonly) and you can hit 
the submit button as many times as you like and nothing will happen.

Any ideas??

BR
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/75b018fb-f3b6-47a4-8b50-fec32d8740ae%40googlegroups.com.


[web2py] Re: Why would new code be ignored and old code be executed?

2020-03-06 Thread Andrew Rogers
Thanks for your advice Val. I will try your suggestion... and google search 
a little to see what it does

I dont think i had two servers running but i will look out  for that in the 
future.

It seems that the Module i added was the main problem. I moved all the code 
into the Controller and didnt have any more issues. I dont know what best 
practice is but from a few things i read it seemed to discourage using 
Modules.

On Friday, 6 March 2020 07:05:27 UTC+10, Val K wrote:
>
> To track module changes try this
>
>
> from gluon.custom_import import track_changes; track_changes(True)
>
> Also, your problem looks like you have more then one web2py server running
>
>

-- 
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/e6423e83-dea7-4ab7-9b9b-c8989f1a2748%40googlegroups.com.


Re: [web2py] Re: Why would new code be ignored and old code be executed?

2020-03-06 Thread Carlos Correia

Às 09:38 de 06/03/20, Andrew Rogers escreveu:
Thanks for your advice Val. I will try your suggestion... and google search a 
little to see what it does


I dont think i had two servers running but i will look out for that in the 
future.

It seems that the Module i added was the main problem. I moved all the code 
into the Controller and didnt have any more issues. I dont know what best 
practice is but from a few things i read it seemed to discourage using Modules.


Code in the modules folder are compiled automatically when the python file is 
first invoked. So, after you change any file in modules, you should remove the 
correspondent .pyc file.


In controllers and models, however the files are not compiled by default, so, 
most likely, there are no compiled files in those folders and the code is 
interpreted at every request.




On Friday, 6 March 2020 07:05:27 UTC+10, Val K wrote:

To track module changes try this


from gluon.custom_import import track_changes; track_changes(True)

Also, your problem looks like you have more then one web2py server running



Regards,

Carlos Correia
=
MEMÓRIA PERSISTENTE
GSM:  917 157 146
e-mail: ge...@memoriapersistente.pt
URL: http://www.memoriapersistente.pt
XMPP (Jabber): car...@memoriapersistente.pt
GnuPG: wwwkeys.eu.pgp.net

--
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/2972294b-9cfb-cc26-356d-ea9ec97c99fa%40memoriapersistente.pt.


Re: [web2py] Re: Why would new code be ignored and old code be executed?

2020-03-06 Thread AGRogers
>>>  Code in the modules folder are compiled automatically when the python
file is first invoked. So, after you change any file in modules, you should
remove the correspondent .pyc file.

Ah, i see, Thanks for the tip.

On Fri, 6 Mar 2020 at 19:48, Carlos Correia 
wrote:

> Às 09:38 de 06/03/20, Andrew Rogers escreveu:
>
> Thanks for your advice Val. I will try your suggestion... and google
> search a little to see what it does
>
> I dont think i had two servers running but i will look out  for that in
> the future.
>
> It seems that the Module i added was the main problem. I moved all the
> code into the Controller and didnt have any more issues. I dont know what
> best practice is but from a few things i read it seemed to discourage using
> Modules.
>
> Code in the modules folder are compiled automatically when the python file
> is first invoked. So, after you change any file in modules, you should
> remove the correspondent .pyc file.
>
> In controllers and models, however the files are not compiled by default,
> so, most likely, there are no compiled files in those folders and the code
> is interpreted at every request.
>
>
> On Friday, 6 March 2020 07:05:27 UTC+10, Val K wrote:
>>
>> To track module changes try this
>>
>>
>> from gluon.custom_import import track_changes; track_changes(True)
>>
>> Also, your problem looks like you have more then one web2py server running
>>
>
> Regards,
>
> Carlos Correia
> =
> MEMÓRIA PERSISTENTE
> GSM:  917 157 146
> e-mail: ge...@memoriapersistente.pt
> URL: http://www.memoriapersistente.pt
> XMPP (Jabber): car...@memoriapersistente.pt
> GnuPG: wwwkeys.eu.pgp.net
>
> --
> 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/2972294b-9cfb-cc26-356d-ea9ec97c99fa%40memoriapersistente.pt
> 
> .
>

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


Re: [web2py] Re: SQLFORM grid process not working

2020-03-06 Thread Andrew Rogers

>
> Many thanks to you guys for answering so many user questions. I am finding 
>> it really helpful.
>>
>
Cheers
Andrew 

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


Re: [web2py] Re: Why would new code be ignored and old code be executed?

2020-03-06 Thread Val K
oh yeah, it is definitely due to you press compile in appadmin, it is intended 
for production. Dont compile app while you develop. I use modules without any 
issues with tracking as i mentoined above

-- 
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/79527280-91d7-4ebe-8fe6-408a4b1fa049%40googlegroups.com.


[web2py] Re: web2py broken with Python 3.8

2020-03-06 Thread 'jim kaubisch' via web2py-users
What was the result of 3.8 for you when you tried it? 

On Wednesday, January 15, 2020 at 9:36:55 AM UTC-8, Woody wrote:
>
> Good news! I'll give it a try.
>
> On Friday, December 6, 2019 at 10:56:48 AM UTC-5, Woody wrote:
>>
>> web2py is broken with Python 3.8. I asked a question about this a few 
>> days ago and was told that it would be fixed. Looking at the open issues 
>> for w2p, I don't see open issues related to fixing these incompatibilities. 
>> I would be interested in some discussion about specifically what the 
>> incompatibilities are, which open issues are addressing these problems and 
>> the time frame to fix. What's the scale of these problems? Is it possible 
>> to manually patch the problems?
>>
>

-- 
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/ba69-c27c-42ae-b53d-2cf8648e3e44%40googlegroups.com.