1.1 --- a/examples/CGI/ConfiguratorApp.py Sat Jul 16 17:56:19 2005 +0000
1.2 +++ b/examples/CGI/ConfiguratorApp.py Sat Jul 16 17:56:52 2005 +0000
1.3 @@ -9,29 +9,11 @@
1.4 sys.path.append("/home/paulb/Software/Python/libxml2dom")
1.5
1.6 from WebStack.Adapters.CGI import deploy
1.7 -from WebStack.Resources.ResourceMap import MapResource
1.8 -from WebStack.Resources.Static import DirectoryResource
1.9 import Configurator
1.10 -import os
1.11 -
1.12 -# Get the directory of the application.
1.13 -
1.14 -configurator_resource = Configurator.ConfiguratorResource()
1.15 -directory = configurator_resource.resource_dir
1.16 -
1.17 -# Make a simple Web site.
1.18
1.19 -resource = MapResource({
1.20 - # Static resources:
1.21 - "styles" : DirectoryResource(os.path.join(directory, "styles"), {"css" : "text/css"}),
1.22 - "scripts" : DirectoryResource(os.path.join(directory, "scripts"), {"js" : "text/javascript"}),
1.23 - # Main page:
1.24 - "" : configurator_resource,
1.25 - # Fragments:
1.26 - "cpu" : configurator_resource,
1.27 - "memory" : configurator_resource,
1.28 - "hard-disks" : configurator_resource
1.29 - })
1.30 +# Get a simple Web site.
1.31 +
1.32 +resource = Configurator.get_site()
1.33
1.34 # Special magic incantation.
1.35