You missed my edit -- I corrected:

request.extension = 'xml' or redirect(URL(extension='xml'))

to:

request.extension == 'xml' or redirect(URL(extension='xml'))

It works as expected with that correction.

Note, there is no difference between returning response.render(dict()) and 
just returning dict().

Anthony

On Friday, December 30, 2016 at 6:45:41 PM UTC-5, 黄祥 wrote:
>
> just a little modification it's work well now, thanks anthony
> *e.g.*
> *controllers/default.py*
> def sitemap():
> if not request.extension == 'xml':
> redirect(URL(extension = 'xml') )
> return response.render(dict() )
>
> thanks and best regards,
> stifan
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to