Or delete the view/generic.* files.

On Nov 4, 9:30 pm, Bruno Rocha <[email protected]> wrote:
> May be not the best approach, but
>
> in any model or controller you can check for extension with
>
> *request.extension*
> *
> *
> ***so, *
> *
> *
> if request.extension in ['rss','json','xml','rss']: raise HTTP(400, "Not
> Found")
>
> 2010/11/4 john <[email protected]>
>
>
>
> > Maybe my google-fu is a bit rusty, but for the life of me, I couldn't
> > find anything about disabling unused renders in web2py.
>
> > For example:
> >http://127.0.0.1:8000/app/default/index
> >http://127.0.0.1:8000/app/default/index.xml
> >http://127.0.0.1:8000/app/default/index.json
> >http://127.0.0.1:8000/app/default/index.rss
>
> > is there a way I can disable .xml and .json and .rss?
>
> > I've already deleted views/generic.rss, views/generic.xml, views/
> > generic.json...
> > and commented in models/db.py:
> > #service = Service(globals())
>
> > I'm running web2py through mod_wsgi on Apache, if that helps any...
>
> > Any hints? or would I have to modify the web2py source on my
> > deployment?  :(
>
> > John
>
> --
>
> http://rochacbruno.com.br

Reply via email to