In article ,
Gabriel wrote:
>
>I have something like this:
>
>@render(format="a")
>@render(format="b")
>@
>def view(format, data):
> return data
>
>Each render will do something with 'data' if format match, and nothing
>if not.
>
>But if there is no more renders to eval, the last one is the
On May 30, 6:16 pm, Gabriel wrote:
> I have something like this:
>
> @render(format="a")
> @render(format="b")
> @
> def view(format, data):
> return data
> In my understanding this equivalent to:
>
> render('a',
> render('b',
> view(***)))
Not quite. 'render' is a function of one arg
Gabriel opensuse.org> writes:
> In my understanding this equivalent to:
>
> render('a',
> render('b',
> view(***)))
>
> Is there any way to know, in this case, that 'a' is the 'default' format?
You could set an attribute on the function indicating the default.
--
http://mail.python.or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Hi,
I have something like this:
@render(format="a")
@render(format="b")
@
def view(format, data):
return data
Each render will do something with 'data' if format match, and nothing
if not.
But if there is no more renders to eval, the last o