Version 2 (modified by Michael Howden, 12 years ago) ( diff )


Developer Guidelines - Basics

Here are some helpful hints to get started developing in Sahana Eden.

Running Sahana Eden

cd .. # the web2py main directory

Or if you don't want to have to enter a password (or have issues launching the Web2Py GUI).

python -a 1234

Wiping the Database

Out of the box Sahana Eden is set to use the SQLite database. If you want to wipe all the data, simply delete the databases/ directory, along with the sessions/ directory (this contains details about your login - which will be invalid as you'll be deleting the user account). The next time you run Sahana Eden, it will recreate the database tables.

Pre-Populating Data

Sahana Eden is able to "Pre-Populate" data so you can explore/test/develop the application with different types of data. Pre-Populate options are associated with the Templates, but they can be set in models/

IFRC_Train is a good set of pre-populate to use (See: It also has an admin user account: password: testing. To use it edit models/


# =============================================================================
# Over-rides to the Template may be done here

Add (or un-comment):

settings.base.prepopulate = ["IFRC_Train"]

Pre-populate data will only be created if the database is empty, so you may need to wipe the database first. It may take a few minutes to load the data.

Debug Mode

In models/ uncomment this line:

settings.base.debug = True


  • Use the non-minified CSS & JS
  • See changes in {{{modules/eden}} files without restarting Web2Py

Running a Sahana Eden Python Shell

To open a Python Shell in the Sahana Eden Environment, where you can inspect Sahana Eden variable as well as access the data:

cd .. # the web2py main directory
python -S eden -M

To create data you will need to use the db.commit() command.

Note: See TracWiki for help on using the wiki.