1.1 --- a/examples/Common/Configurator/__init__.py Sat Mar 04 18:53:12 2006 +0000
1.2 +++ b/examples/Common/Configurator/__init__.py Sat Mar 04 18:53:32 2006 +0000
1.3 @@ -42,10 +42,10 @@
1.4 "translations" : "translations.xml"
1.5 }
1.6 in_page_resources = {
1.7 - "cpu" : ("config_output_cpu.xsl", "cpu-node"),
1.8 - "memory" : ("config_output_memory.xsl", "memory-node"),
1.9 - "hard-disks" : ("config_output_harddisks.xsl", "hard-disks-node"),
1.10 - "accessories" : ("config_output_accessories.xsl", "accessories-node")
1.11 + "cpu" : ("configuration", "config_output_cpu.xsl", "cpu-node"),
1.12 + "memory" : ("configuration", "config_output_memory.xsl", "memory-node"),
1.13 + "hard-disks" : ("configuration", "config_output_harddisks.xsl", "hard-disks-node"),
1.14 + "accessories" : ("configuration", "config_output_accessories.xsl", "accessories-node")
1.15 }
1.16
1.17 def respond_to_form(self, trans, form):
1.18 @@ -119,7 +119,7 @@
1.19 # Ensure that an output stylesheet exists.
1.20
1.21 if in_page_resource in self.in_page_resources.keys():
1.22 - trans_xsl = self.prepare_fragment("configuration", in_page_resource)
1.23 + trans_xsl = self.prepare_fragment(in_page_resource)
1.24 stylesheet_parameters = self.prepare_parameters(parameters)
1.25 else:
1.26 trans_xsl = self.prepare_output("configuration")
1.27 @@ -168,4 +168,10 @@
1.28
1.29 return resource
1.30
1.31 +# Resource preparation ahead of time - useful for making installations.
1.32 +
1.33 +def prepare_resources():
1.34 + for cls in [ConfiguratorResource]:
1.35 + XSLForms.Resources.WebResources.prepare_resources(cls)
1.36 +
1.37 # vim: tabstop=4 expandtab shiftwidth=4