I'll elaborate a bit more. I'll be back soon. ;-) On Tue, Aug 6, 2013 at 11:06 AM, Anthony <[email protected]> wrote: > Not sure I understand. If you have multiple possible views that could be > rendered for a given action, don't you have to explicitly set the value of > response.view in your app code? The view that gets rendered is either the > view in response.view or it is the generic view (unless of course your code > directly calls response.render()). So, can't you just check the value of > response.view? > > > On Tuesday, August 6, 2013 9:26:49 AM UTC-4, viniciusban wrote: >> >> Yes, but there's a more complex scenario. >> >> Let's say I have a list page, where I can 2 views: one to show when db >> is emtpy and other to show when db is populated. >> Other scenario is to test a logged_in action. If I don't have a logged >> in user, another page must exist. >> >> In all these cases above all views exist, but just one of them must be >> showed. >> >> It's not a matter to check if a view exists or not. It's a matter to >> know which of them was really rendered. >> >> What I'm asking for is to update response.view to represent the >> rendered view. Or have something new like response.rendered_view >> >> Would it be possible? >> >> >> On Tue, Aug 6, 2013 at 10:07 AM, Anthony <[email protected]> wrote: >> > I think you would have to manually check with the response.view file (or >> > the >> > compiled version) is present (if not, assume the generic view was used). >> > >> > Anthony >> > >> > >> > On Tuesday, August 6, 2013 7:58:21 AM UTC-4, viniciusban wrote: >> >> >> >> I'm working on tests in apps, again. >> >> >> >> To test a controller, we usually check if some view was used, but when >> >> response.view doesn't exist, generic.<extension> is used and >> >> response.view is not updated accordingly. >> >> >> >> In this situation, how may know which view was really rendered? >> > >> > -- >> > >> > --- >> > 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/groups/opt_out. >> > >> > > > -- > > --- > 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/groups/opt_out. > >
-- --- 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/groups/opt_out.

