Yes, I think so. Using only response.view = 'myview' (without extension) works too?
On 5/24/09, mdipierro <mdipie...@cs.depaul.edu> wrote: > > currently you can set view but that overrides the requested extension. > For example > > http://..../action.xml > > def action(): > response.view='myview.html' > return dict() > > unless > > def action(): > response.view='myview.'+request.extension > return dict() > > Is this sufficient? I think so. > > > On May 23, 10:25 pm, Álvaro Justen [Turicas] <alvarojus...@gmail.com> > wrote: >> Massimo, >> and about to setting views? With "normal" views we can do: >> response.view = 'blablabla.html' >> How we can setup these RSS, XML etc. views with response? Is there a >> way? If not, I think we should create one. >> >> On 5/23/09, mdipierro <mdipie...@cs.depaul.edu> wrote: >> >> >> >> >> >> > You can remove the generic.xxx file that you do not want or rename it >> > to match only the actions to which it applies. >> >> > Massimo >> >> > On May 22, 11:02 pm, posh <posheng...@gmail.com> wrote: >> >> I have tried this, and it's convenient and intuitive. :p >> >> >> But I am thinking that can we disable any of them in controller(html, >> >> xml, json, and rss)? >> >> >> On 5月23日, 上午11時29分, mdipierro <mdipie...@cs.depaul.edu> wrote: >> >> >> > so... has anybody tried this? Pros? Cons? >> >> >> > can we release 1.63 next week? >> >> >> > On May 22, 7:54 am, mdipierro <mdipie...@cs.depaul.edu> wrote: >> >> >> > > - download trunk >> >> > > - Create a new app >> >> > > - make sure you see the new views/generic.* files in the new app or >> >> > > something is wrong >> >> >> > > - edit default.py and create an action: >> >> >> > > def test(): >> >> > > return >> >> > > dict(title='title1',link='link',description='description', >> >> > > items=[dict >> >> > > (title='title2',link='link',description='description'), >> >> > > dict >> >> > > (title='title3',link='link',description='description'), >> >> > > dict >> >> > > (title='title4',link='link',description='description')]) >> >> >> > > (there is nothing special here, just an example) now call it in the >> >> > > usual way >> >> >> > > http://.../test >> >> >> > > but also try >> >> >> > > http://.../test.html >> >> > > http://.../test.xml >> >> > > http://.../test.json >> >> > > http://.../test.rss >> >> >> > > Notice there is nothing you need to do. It should just work. >> >> >> > > Massimo >> >> -- >> Álvaro Justen >> Peta5 - Telecomunicações e Software Livre >> 21 3021-6001 / 9898-0141 >> http://www.peta5.com.br/ > > > -- Álvaro Justen Peta5 - Telecomunicações e Software Livre 21 3021-6001 / 9898-0141 http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---