again! ;-)

def product():
    if request.args(0) is None or session.uuid != request.args(0):
                   raise HTTP(404)

    return dict()

2015-01-02 0:39 GMT+01:00 Michele Comitini <michele.comit...@gmail.com>:

> correction:
>
> def product():
>     if request.args(0) is not None and session.uuid != request.args(0):
>                    raise HTTP(404)
>
>     return dict()
>
> 2015-01-02 0:36 GMT+01:00 Michele Comitini <michele.comit...@gmail.com>:
>
>> def product():
>>     if session.uuid != request.args(0):
>>                    raise HTTP(404)
>>
>>     return dict()
>>
>>
>>
>>
>> 2014-12-30 4:46 GMT+01:00 Joe <degroupme...@gmail.com>:
>>
>>> What I am trying to do is send the user to a "product" page where the
>>> URL will be a unique URL which can not be used again to access that page
>>> after that session.
>>>
>>> This is what I did, but it's not working as I can use the same URL from
>>> an other browser and I can still get to the "product" page.
>>>
>>> def test():
>>>     from gluon.utils import web2py_uuid
>>>     session.uuid = web2py_uuid()
>>>     redirect(URL('product', args = session.uuid))
>>>     return locals()
>>>
>>> def product():
>>>     return locals()
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to