sorry for the previous one

note the HTTP_REFERER
#code.py

import web

urls = (
    '/', 'ref',
    '/ref', 'hello'
)

class ref():
    def GET(self):
        print '<a href="/ref">See ref</a>'

class hello:
    def GET(self):
        for i in web.ctx.env:
            print i, '=', web.ctx.env[i]

if __name__ == "__main__":
    web.run(urls, globals())

#eof


> On Nov 23, 4:24 am, placid <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > Is there a way of getting the refferer url ? For example;
>
> >  import web
>
> >   urls = (
> >       '/hello', 'hello',
> >       '/hi','hi;
> >   )
>
> >   class hello:
> >       def GET(self, name):
> >          # here find the refferer to this url
>
> >           i = web.input(times=1)
> >           if not name: name = 'world'
> >           for c in xrange(int(i.times)): print 'Hello,', name+'!'
>
> >   class hi:
> >       def GET(self):
> >           web.seeother('/hello')
>
> > so in class hello and the GET function, i want to be able to work out
> > the referrer to that url. Is this possible?
--~--~---------~--~----~------------~-------~--~----~
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