Changes between Version 14 and Version 15 of BluePrintWebSetup


Ignore:
Timestamp:
06/07/10 07:50:36 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintWebSetup

    v14 v15  
    77
    88Configuration settings are in the file {{{models/000_config.py}}} which will have a simple structured format.
     9 * 000_config.py instantiates the '''S3Config''' class as ''deployment_settings'':
     10   * S3Config is a subclass of ''Storage'' and can therefore be written in dot-notation
     11   * S3Config implements methods to read the config values (instead of accessing the instance attributes themselves), which also implement any fallback values. These methods should be used throughout the application (=do not store their return values in any local variables).
     12   * S3Config could contain a method to generate a web form to create a new instance (+pre-populate the form with values of another instance)
     13   * S3Config could then even contain a method to write the instance to a config file like 000_config.py
     14   * a S3Config instance could be made read-only during the current request (=safer) by amending the ''__setattr__'' method to not except updates (then you can still overwrite deployment_settings by replacing it with a new instance)
    915 * {{{models/00_settings.py}}} reads these settings to do the actual configuration.
    1016 * The Web Setup should ideally read in the {{{000_config.py}}} file, make any amendments as-required & then write it out.