10 Jul
2001
10 Jul
'01
6:07 p.m.
James van der Veen writes:
.... So now my question: How can I make the link change depending on if there already exists a stylesheet_properties in custom (URL/custom/stylesheet_properties)and if not like them to the stylesheet_properties of generic(URL/generic/stylesheet_properties) The link goes to a Python script thats, whether "custom" has the "stylesheet_properties" already. If not, it creates it first. Then it modifies the object.
Checking is possible like this: try: style= context.custom['stylesheet_properties'] # it is already there except KeyError: # it is not yet there .... Dieter