On Sun, 2011-02-20 at 19:53 -0800, Jonathan Vanasco wrote:
> i'm trying to figure out some paradigms in pyramid
>
> using the pyramid_sqla template...
>
> if i have:
>
> @action(renderer='/account/test_a.mako')
> def test_a(self):
> return {'project':'myapp'}
>
> @action(renderer='/account/test_b.mako')
> def test_b(self):
> return {'project':'myapp'}
>
> how can i do something like:
>
> def test_c(self):
> if 1:
> return self.test_a()
> else:
> return self.test_b()
def test_c(self):
if 1:
result = self.test_a()
tmpl = '/account/test_a.mako'
else:
result = self.test_b()
tmpl = '/account/test_b.mako'
return render_to_response(tmpl, result, request=self.request)
- C
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.