Object request isn't working

18 views
Skip to first unread message

Marlysson Silva

unread,
May 28, 2015, 1:16:59 AM5/28/15
to web...@googlegroups.com
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':
NameError: name 'request' is not defined

Theoretically was to working,What I'm making of the wrong?

Jose C

unread,
May 28, 2015, 5:23:32 AM5/28/15
to web...@googlegroups.com

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)

Anthony

unread,
May 28, 2015, 9:39:37 AM5/28/15
to web...@googlegroups.com, marly...@gmail.com
Where are you running that code?
Reply all
Reply to author
Forward
0 new messages