Sahana Eden is a highly configurable system that can be adapted to many different needs and situations. If you've taken the time planning your project and have answered the questions posed in the "Planning a Deployment" section, you are now simply looking for where to enter the answers.
Configuration through the web interface
At the moment only some settings, like SMS, email and Twitter, are editable through the Web UI. Future plans are to add more configuration settings through the Web UI but for now the best option to configure Sahana Eden is to edit the models/000_config.py file.
Configuration through text filesMost configuration options can be changed by editing models/000_config.py. This consists of sections of Python code where settings for a particular component of the system can be changed. Most of the changes take effect immediately after saving the file. Some changes would take effect only after compiling on a production environment.
models/000_config.py has to be edited before using Sahana Eden. Once you have edited models/000_config.py, change the FINISHED_EDITING_CONFIG_FILE variable to True.
There are comments placed next to the code which are quite self-explanatory in nature. Users must not change the variables (or their names), they just need to change their values to configure the instance.
The following are sections of models/000_config.py explained in detail:
It is recommend that production systems use MySQL. For databases like MySQL and PostgreSQL it is more secure to provide the application with a database account with minimal privileges.
This section of the models/000_config.py file can be used to configure settings like:
- Database Host: The server where your database is hosted
- Database Name: The name of the database being used
- Username: The username that has been assigned to the user for use with Eden
- Password: Password assigned to the user
- Port: Port at which the database service is available. Set to None to use the default setting
- Pool size: This allows tuning of the number of reusable open connections to the database available at a moment in time.
Administrators can use these settings to implement security policies and to make sure that there is no unauthorized access or data manipulation in the system. These settings are related to creating the first user account of the system and determining how users register and access the system.
Users can configure the system name, the public URL of the system and data pre-population in this section of models/000_config.py.
One of the most important system settings would be database pre-population. Users can determine if the database will be pre-populated with sample data or not. There are settings for pre-population for tasks like regression testing or demos.
Changing the database migration setting to False in production will lead to a performance gain. Migration tries to alter the SQL database schema to match that expected in the code. This works very well for simple cases, but may result in loss of existing data for complex cases, so should be applied with care to Production servers.
Web2Py supports automatic migration, but it does lead to performance losses, so enable migration only when necessary.
Sahana Eden can be configured to use a email service for messaging. This section can help you to set up things like the URL and port of the mail server, and the login credentials to be used for accessing the email system.
Sahana Eden has a dynamic frontpage with a capability to display RSS or Twitter feeds. You can change certain aspects of the landing page of the application in the frontpage settings section of the code.
Settings in this section can be used to change which RSS and Twitter feeds are subscribed to and displayed on the front page of the application. Use the settings in the Twitter section in models/000_config.py if you want to setup another Twitter account.
Module Specific Settings
Some settings for the Request Management, Inventory Management and Human Resource Management modules can be accessed here. These settings would generally be very specific to the needs of a certain deployment.
Sahana Eden supports a range of modules that can be enabled or disabled to support different deployments. Disabling a module is as simple as commenting it in the code (not just the name, the entire key-value mapping). Comments in Python are preceded by the # symbol. All the text in a line that comes after a # is ignored.
The module list in this file is what appears in the module menu on the front page. All the modules that are disabled here do not appear in that menu.
The core modules Home (default), Administration(admin), Map (gis), Person Registry (pr) and Organization Registry (org) cannot be disabled. This is also pointed out in the relevant section in models/000_config.py. All the other modules can be enabled or disabled as required by the deployment.
For instance, consider the Shelter Registry (the cr module in models/000_config.py). The following code section applies to the Shelter Registry:
("cr", Storage( name_nice = T("Shelter Registry"), #description = "Tracks the location, capacity and breakdown of victims in Shelters", restricted = False, module_type = 10, )),
To disable this module, just make sure that each line in this section starts with a # symbol:
#("cr", Storage( #name_nice = T("Shelter Registry"), #description = "Tracks the location, capacity and breakdown of victims in Shelters", #restricted = False, #module_type = 10, #)),