# ConfigFile
At the core of the WEBTOOLS2 frame work is a single configuration file. This file says what classes (and corresponding pages) to load, what settings to give them (for instance the location of templates, if database access is needed etc.) and server configuration (port number). Each application will have its own configuration file. The file is a standard WMCore configuration file. The configuration that starts the default instance of WEBTOOLS2 (that you are looking at now) is shown below and described in the following text.
### Example
    from WMCore.Configuration import Configuration
    config = Configuration()
    config.component_('Webtools')
    config.Webtools.application = 'webtools'
    config.Webtools.templates = '/Users/metson/WMCORE/src/templates/WMCore/WebTools'
    config.Webtools.index = 'welcome'

    config.Webtools.section_('views')
    config.Webtools.views.section_('active')
    config.Webtools.views.section_('maintenance')

    config.Webtools.views.active.section_('documentation')
    config.Webtools.views.active.documentation.object = 'WMCore.WebTools.Documentation'

    config.Webtools.views.active.section_('controllers')
    config.Webtools.views.active.controllers.object = 'WMCore.WebTools.Controllers'
    config.Webtools.views.active.controllers.css = {'reset': '/Users/metson/WT_Devel/osx105_ia32_gcc401/external/yui/2.2.2-wt/build/reset/reset.css',
                                                    'cms_reset': '../../../css/WMCore/WebTools/cms_reset.css',
                                                    'style': '../../../css/WMCore/WebTools/style.css'}
    config.Webtools.views.active.controllers.js = {}

    config.Webtools.views.active.section_('welcome')
    config.Webtools.views.active.welcome.object = 'WMCore.WebTools.Welcome'
### [config.Webtools]
application defines the name of the application and the root location of the classes that the application comprises. It is used in logging to correctly identify where a problem is coming from. port and environment (production|development) are the standard cherrypy settings (TODO: add other settings) and should be self explainatory. index is the name of the default view the application presents. This view must implement both index() and default(*args, **kwargs), though of course can be static and ignore any input to the default() call. templates is the default directory for the applications Cheetah templates. This can be over ridden by specific views, or unset. If unset the framework will assume the templates are in a directory called Templates under the source directory.
### [config.Webtools.views]
This section contains a section per class to load. The class can be active (config.Webtools.views.active) or in maintenance (config.Webtools.views.maintenance). Currently maintenance views are just not loaded, in the future they will return a standard maintenance page. (TODO: implement maintenance for views).
### [config.Webtools.views.active.controllers]
The Controllers class is a standard class from the framework. It provides a standard way to access static content such as javascript or css (TODO: implement handling images). Correct headers are set and content minified (TODO: implement correct minification of javascript) and gzipped for quick delivery. Content is cached so that repeat requests do not require manipulation. If a requested script is missing it is skipped, logged and not cached.
### [config.Webtools.views.active.welcome] & [config.Webtools.views.active.documentation]
The two basic pages. The object value is the name of the class to load. If your page needs additional arguements passed to it you can add them as follows:
    		  		config.Webtools.views.active.welcome.foo = bar
Such parameters will be added to the configuration passed into your page object.