Changes between Version 7 and Version 8 of BluePrint/PrePopulate


Ignore:
Timestamp:
03/18/12 14:44:18 (13 years ago)
Author:
graeme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/PrePopulate

    v7 v8  
    1515== Methods ==
    1616=== On First Run ===
    17 In models/000_config.py their is a deployment setting to control prepopulate. This is a list of directory names and will import data from a number of CSV files. The directories must be in the private/prepopulate directory tree and must include a file called tasks.cfg.
     17In models/000_config.py their is a deployment setting which is used to control prepopulate. This is a list of directory names and will import data from a number of CSV files. The directories must be in the private/prepopulate directory tree and must include a file called tasks.cfg.
     18
     19The prepopulate deployment setting can also be a number which will relate to a single directory, the numerical value is still supported because existing instances of Eden and their maintenance scripts use this number. The use of a number is discouraged in favour of the list of names because this new approach is clearer and more flexible.
     20
     21==== Deployment setting examples ====
     22Use the Shipment folder as the starting point for the prepopulate.
     23{{{
     24deployment_settings.base.prepopulate = ["Standard"]
     25}}}
     26The Standard folder is not in the root directory, which is private/prepopulate, rather it is in demo (private/prepopulate/demo) but this will be found automatically.
     27
     28Uses the roles to import some special roles and then the user directory which is a special directory which is external to the version control and so private data (potentially sensitive data - such as volunteer details) can be held and then imported.
     29{{{
     30deployment_settings.base.prepopulate = ["roles", "user"]
     31}}}
     32
    1833
    1934The tasks.cfg file comprises a list of import jobs. They can be of two distinct types:
     
    4257*,gis_set_default_location,defaultlocation.csv
    4358}}}
    44 This uses the csv file '''default_location.csv''' and the function '''gis_set_default_location''' to set, in this case, the default location.
     59This uses the csv file '''default_location.csv''' and the function '''gis_set_default_location''' to set, in this case, the default location. Another special function is import_role which is used to import user permissions (or roles) examples of the roles and what the csv looks like can be found in the private/prepopulate/roles directory.
     60
    4561=== URL Import ===
    4662Data can be imported using URL calls:
     
    7692
    7793 
    78