Changes between Initial Version and Version 1 of DeveloperGuidelines/Basics


Ignore:
Timestamp:
12/21/12 02:30:48 (12 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Basics

    v1 v1  
     1= Developer Guidelines - Basics =
     2
     3== Running Sahana Eden ==
     4{{{
     5cd .. # the web2py main directory
     6python web2py.py
     7}}}
     8Or if you don't want to have to enter a password (or have issues launching the Web2Py GUI).
     9{{{
     10python web2py.py -a 1234
     11}}}
     12
     13== Wiping the Database ==
     14Out 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.
     15
     16== Pre-Populating Data ==
     17Sahana Eden is able to "[DeveloperGuidelines/PrePopulate Pre-Populate]" data so you can explore/test/develop the application with different types of data. Pre-Populate options are associated with the [DeveloperGuidelines/Templates Templates], but they can be set in {{{models/000_config.py}}}.
     18
     19{{{IFRC_Train}}} is a good set of pre-populate to use (See: https://github.com/flavour/eden/tree/master/private/templates/IFRC_Train). It also has an admin user account: admin@example.com password: testing. To use it edit {{{models/000_config.py}}}:
     20
     21After:
     22{{{
     23# =============================================================================
     24# Over-rides to the Template may be done here
     25}}}
     26Add (or un-comment):
     27{{{
     28settings.base.prepopulate = ["IFRC_Train"]
     29}}}
     30
     31Pre-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.
     32
     33== Debug Mode ==
     34In {{{models/000_config.py}}} uncomment this line:
     35{{{
     36settings.base.debug = True
     37}}}
     38to:
     39* Use the non-minified CSS & JS
     40* See changes in {{{modules/eden}} files without restarting Web2Py
     41
     42== Running a Sahana Eden Python Shell ==
     43To open a Python Shell in the Sahana Eden Environment, where you can inspect Sahana Eden variable as well as access the data:
     44{{{
     45cd .. # the web2py main directory
     46python web2py.py -S eden -M
     47}}}
     48To create data you will need to use the {{{db.commit()}}} command.