Thanks Massimo, that will probably sort it out, I've had a quick look at 
bottle and should be able to amend the code appropriately.

I'll post again when it appears to be working, which, hopefully, won't be very 
long

graham


     On Tuesday, October 15, 2019, 3:38:48 AM GMT+1, Massimo Di Pierro 
<[email protected]> wrote:  
 
 py4web has no current and does not need it it.
from py4web import request
and just use request in your actions. Mind this is a bottlepy request, not the 
same as the web2py request object.

On Monday, 14 October 2019 06:03:14 UTC-7, graham wrote:
 I'll certainly give more details when it's working - the original web2pyslices 
posting was in 2016.

But my problem at the moment is where is 'current.request' ? That was in 
 from web2py.gluon import current
but despite importing py4web (and pydal) there seems to be no 'current' 
structure. As I mentioned the documentation isn't really helpful in this.

I'm currently using a 20190929 build (via Pycharm) and py4web itself will run.

graham     On Monday, October 14, 2019, 1:26:36 AM GMT+1, Massimo Di Pierro 
<[email protected]> wrote:  
 
 I was not aware of it. Could you post some screen shots? maybe an example of a 
generated app?Unless you use grids it should be easy to port it to py4web.

On Sunday, 13 October 2019 17:23:37 UTC-7, graham wrote:
I used web2py some years ago and produced a program generator 
(http://www.web2pyslices.com/ slice/show/2060/generator-for- web2py) which met 
with universal disinterest...

However someone has asked whether it could work with py4web and so I have had a 
quick look at it. There are minor Python 3 issues which are easily fixed but 
when I start to look at the web2py interface I immediately come across a 
problem: the code makes us of the 'current' structure, in particular it uses 
current.request to obtain the POST data and there appears to be no such 
structure  in py4web.

I have checked the py4web documentation and it does say in the PyDAL chapter, 
under ;'Model-less applications' "...and provide necessary access to global 
scope via the current object (as described in Chapter 4)." but Chapter 4 does 
not contain any details. Perhaps this contains a lot of text from the web2py 
docs and will have corrections and more py4web content included later.

Obviously this is not of any real relevance to py4web itself but I just 
wondered whether it is intended that 'current' or an equivalent is or will be 
available in py4web or is there any simple (because I don't want to take up too 
much of your time) work around.

Thanks

graham



-- 
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+unsubscribe@ googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/ 
msgid/web2py/fdf7c91b-a6d3- 4bd1-9d32-31c9bd7bdb37% 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/65abb443-8764-4d7b-887b-3e05abafca7c%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2068207911.1162557.1571146378993%40mail.yahoo.com.

Reply via email to