Where are you running that code?
On Thursday, May 28, 2015 at 1:16:59 AM UTC-4, Marlysson Silva wrote:
>
> People I'm trying to verify the host of user, and make this way:
>
> if request.env.server_name == '127.0.0.1':
>
> But the admin show me a error:
>
> if request.env.server_name == '127.0.0.1
>
>
> But the admin show me a error:
>
> if request.env.server_name == '127.0.0.1':
> NameError: name 'request' is not defined
>
>
> Are you perhaps using python 3? (Type `python --version` at the command
to check)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
2 matches
Mail list logo