is it possible to enforce function in controller to return with xml 
extension? 
let say i have a sitemap.xml file that generated with a function in module 
(can be execute manually in controllers or scheduler) and put it on 
views/default/sitemap.xml, to acess http://127.0.0.1:8000/a/default/sitemap 
i want it redirect to http://127.0.0.1:8000/a/default/sitemap.xml (with xml 
extension), so i tried several ways :

*e.g.trial 1*
def sitemap():
response.view = 'sitemap.xml'
return locals()

access http://127.0.0.1:8000/a/default/sitemap
*result* : 
Sitemap

*trial 2*
def sitemap():
response.view = 'generic.xml'
return locals()

access http://127.0.0.1:8000/a/default/sitemap
*result* : display none (blank white)

*trial 3*
def sitemap():
redirect(URL('default', 'sitemap.xml') )

access http://127.0.0.1:8000/a/default/sitemap
*result* : 
The 127.0.0.1 page isn’t working

*127.0.0.1* redirected you too many times.



*trial : 4not define function at all*
access http://127.0.0.1:8000/a/default/sitemap
*result* : 
invalid function (default/sitemap)

any idea how to face this using web2py way?

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