hmmm. I responded already but my response does not show. trying
again...

On Jun 1, 2:56 pm, Grigory Antonov <[email protected]> wrote:
> Hi, please, give some comments about new features:> - "from gluon import *" 
> imports in every python module a web2py
> > environment (A, DIV,..SQLFORM, DAL, Field,...) including
> > current.request, current.response, current.session, current.T,
> > current.cache, thanks Jonathan.
>
> While using ide's like pycharm,  there are some problems with
> completion and discover of web2py internal variables like request,
> response, this new feature should improve ide support, but it's
> happened so that in the code we  use response and request, and "from
> gluon import *" feature  imports current.response and current.request.
> How can I fix this? I mean what should I place in gluon to help ide
> understand "request" without "current"?

I think you can do

if False:
    from gluon import *; globals().update(current.__dict__)

but I did not try.

> > - request.is_local
>
> If I understand correctly this function checks whether app is working
> on localhost, if so, then maybe it will be really simple to add
> another feature - while working on localhost(mostly development mode),
> when something raises an error, show not link to ticket, but straight
> debug info page, just skip "clicking on ticket link" step - this will
> speed up dev process.

The problem is that one cannot reliably determine whether the client
is on localhost.
request.is_local is a guess, not a certainty. Moreover the user may be
local but not the administrator since there may be more users local on
the same machine.


> Thank you for making web2py better )

Reply via email to