Version 36 (modified by Fran Boon, 12 years ago) ( diff )


Configuration Guidelines

File Permissions

chown www-data web2py/applications/admin/cron
chown www-data web2py/applications/admin/cron/crontab
chown www-data web2py/applications/admin/cache/
chown www-data web2py/applications/admin/databases/
chown www-data web2py/applications/admin/errors/
chown www-data web2py/applications/admin/languages/
chown www-data web2py/applications/admin/sessions/
chown www-data web2py/applications/admin/uploads/
cd web2py/applications
bzr branch lp:s3 sahana
chown www-data sahana/cron
chown www-data sahana/cache/
chown www-data sahana/databases/
chown www-data sahana/errors/
chown www-data sahana/languages/
chown www-data sahana/sessions/
chown www-data sahana/static/img/markers
chown www-data sahana/uploads/
mkdir sahana/uploads/gis_cache
mkdir sahana/uploads/images
mkdir sahana/uploads/tracks
chown www-data sahana/uploads/gis_cache
chown www-data sahana/uploads/images
chown www-data sahana/uploads/tracks

Configurable Options

These can be set via

  • Admin Name/Email/Tel
  • Debug: improve performance by deselecting this option.
  • Self-Registration: disable Self-Registration by deselecting this option.
  • Audit Read: Enable Auditing of all Read operations (Display)
  • Audit Write: Enable Auditing of all Write operations (Create/Update/Delete)

In time these will be configured by Web Setup.

Some Auth options are currently only configurable via editing {{models/}}:

auth.settings.hmac_key (Do this *before* registering the 1st user!)

In time we could expose to a Web-based admin page, although it's low priority as these are mostly installation-time decisions.

Disable unnecessary modules, which is currently done in 2 areas:

  1. Hide the menus (to reduce UI clutter):
    • WebUI: /sahana/appadmin/index
    • Table: db.s3_module
  2. Disable the Models (to speed up performance):
    • edit file models/
    • section: shn_module_enable

If you wish to hide some fields which you don't want to confuse your system, then you can do something like this models/ instead of amending the main model (this means that future merges from trunk won't clobber your changes):

# Hide unnecessary fields
table = 'pr_person'
db[table].pr_pe_label.readable = False
db[table].pr_pe_label.writable = False
db[table].local_name.readable = False
db[table].local_name.writable = False
db[table].opt_pr_gender.readable = False
db[table].opt_pr_gender.writable = False
db[table].opt_pr_age_group.readable = False
db[table].opt_pr_age_group.writable = False
db[table].email.readable = False
db[table].email.writable = False
db[table].mobile_phone.readable = False
db[table].mobile_phone.writable = False
db[table].date_of_birth.readable = False
db[table].date_of_birth.writable = False
db[table].opt_pr_nationality.readable = False
db[table].opt_pr_nationality.writable = False
db[table].opt_pr_country.readable = False
db[table].opt_pr_country.writable = False
db[table].opt_pr_religion.readable = False
db[table].opt_pr_religion.writable = False
db[table].opt_pr_marital_status.readable = False
db[table].opt_pr_marital_status.writable = False
db[table].occupation.readable = False
db[table].occupation.writable = False


By default the 1st user to register will gain the Administrator role.

All other users have just the 'Authenticated' level of access, which by default allows 'Read' access to all records.

To Edit records, users need to be added to the 'Editors' role.

To add roles to users, go to the Administration menu & within User Management choose 'Membership'.

Security policy is configured in models/

favicon.ico & robots.txt

These can be provided via 2 different means:

  • mod_rewrite
  • web2py/ copy & edit


This thickbox file needs a hardcoded full path (relative paths don't work), so if you rename your app to something other than 'sahana' then you should amend

  • static/scripts/S3/thickbox.js
  • static/scripts/S3/thickbox.min.js
  • static/scripts/S3/thickbox.compressed.js


Ensure these files are writable by the webserver:

chown www-data /path/to/web2py/applications/sahana/static/scripts/tools
chown www-data /path/to/web2py/applications/sahana/static/styles/S3/sahana.css
chown www-data /path/to/web2py/applications/sahana/static/styles/S3/sahana.min.css

Colour scheme:

  • select using Admin Panel


  • copy new logo to static/img
  • point to this using Admin Panel


  • copy new footer to views/
  • point to this using Admin Panel


Internet Hosting

Can switch to having users download files from CDNs instead of your server.
This can improve performance in 2 ways:

jQuery from Google by uncommenting the line in views/sahana_scripts_min.html

ext-all.js & ext-all.css from Cachefly by uncommenting the lines in views/gis/gis_scripts_min.html & views/gis/ol_js_loaders.html

Performance Optimisation


Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.