in web.py 0.31, int windows, python 2.5.4

it raise:

G:\do\alldo\autopart007\web>python code.py
> Traceback (most recent call last):
>   File "code.py", line 4, in <module>
>     from controllers import admin, people
>   File "G:\do\alldo\autopart007\web\controllers\people.py", line 3, in
> <module>
>     import web, md5, settings
>   File "G:\do\alldo\autopart007\web\settings.py", line 7, in <module>
>     refer = web.ctx.env["HTTP_REFERER"]
>   File "D:\Python\lib\site-packages\web\utils.py", line 830, in __getattr__
>     return getattr(self._getd(), key)
>   File "D:\Python\lib\site-packages\web\utils.py", line 64, in __getattr__
>     raise AttributeError, k
> AttributeError: 'env'
>

I had read the web.py - application.py, it look like right.

        The headers argument specifies HTTP headers as a mapping object
        such as a dict.

            >>> urls = ('/ua', 'uaprinter')
            >>> class uaprinter:
            ...     def GET(self):
            ...         return 'your user-agent is ' +
web.ctx.env['HTTP_USER_AGENT']
            ...


-- 
百才招聘(baicai.com).产品部
Email: [email protected]
Gtalk: [email protected]
twitter.com/qichangxing

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to