Changes between Version 1 and Version 2 of DeveloperGuidelines/PrePopulate


Ignore:
Timestamp:
03/24/12 04:54:26 (10 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/PrePopulate

    v1 v2  
    33
    44== Introduction ==
    5 We need to be able to import data into a Sahana Eden instance for testing, demos and to help with getting up and running.
    6 
    7 == Types of Data ==
     5We need to be able to import data into a Sahana Eden instance for testing, demos and to help with getting up and running such as:
    86 * Item Catalogue
    97 * Organisation List
     
    1513== Methods ==
    1614=== On First Run ===
    17 In 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.
     15In models/000_config.py {{{deployment_settings.base.prepopulate}}} 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.
    1816
    1917The 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.
     
    3634 * Special Import Jobs
    3735The tasks.cfg file supports the # character on the first column as a comment.
     36
     37==== Prepopulate folders ====
     38Within the private/prepopulate there are a number of different folder:
     39* '''default''' - data which will be needed in the deployment
     40* '''demo''' - data which will not be prepopulated in a live deployment, but which is useful for developers.
     41* '''regression''' - data for testing
     42* '''roles''' - data for setting up roles for different types of permissions.
     43The {{{private/prepopulate/default/Default}}} folder contains default data which is needed by all instances of Sahana Eden, so you should always include {{{default/Default}}} in the {{{deployment_settings.base.prepopulate}}} list.
     44
    3845==== Basic Importer Jobs ====
    3946These will use the UI Importer to load in the data and requires the following information:
     
    9198 * Then a configuration file can be created where you can just list the CSV file names which you want to be imported when Sahana Eden is initialized. Copies of this files could be saved in the private/prepopulate/<deployment>/ directory then a config setting could select which file to use, to make it easy to set up Sahana Eden to have different types of data in it.
    9299
     100----
     101See:
     102* BluePrint/PrePopulate
     103
    93104