src/pyams_viewlet/provider.py
changeset 44 95e64220b38c
parent 43 4bbf32d81a21
child 47 df022d00a9c4
equal deleted inserted replaced
43:4bbf32d81a21 44:95e64220b38c
    41     ${structure:provider:my_provider} or ${structure:provider:my_provider(arg1, arg2)}.
    41     ${structure:provider:my_provider} or ${structure:provider:my_provider(arg1, arg2)}.
    42     In the second form, arguments will be passed to the "update" method; arguments can be
    42     In the second form, arguments will be passed to the "update" method; arguments can be
    43     static (like strings or integers), or can be variables defined into current template
    43     static (like strings or integers), or can be variables defined into current template
    44     context; other Python expressions including computations or functions calls are actually
    44     context; other Python expressions including computations or functions calls are actually
    45     not supported, but dotted syntax is supported to access inner attributes of variables.
    45     not supported, but dotted syntax is supported to access inner attributes of variables.
       
    46 
       
    47     Provider arguments can be passed by position but can also be passed by name, using classic
       
    48     syntax as in ${structure:provider:my_provider(arg1, arg3=var3)}
    46     """
    49     """
    47 
    50 
    48     def get_value(econtext, arg):
    51     def get_value(econtext, arg):
    49         """Extract argument value from context
    52         """Extract argument value from context
    50 
    53