Version 32 (modified by 15 years ago) ( diff ) | ,
---|
Configuration Guidelines
Configurable Options
These can be set via http://127.0.0.1:8000/sahana/admin/setting/update/1
- 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/00_db.py}}:
mail.settings.server mail.sender auth.settings.login_methods.append(ldap_auth()) auth.settings.registration_requires_verification auth.settings.captcha auth.messages.verify_email auth.settings.registration_requires_approval auth.settings.gmail_login
In time we could expose to a Web-based admin page, although it's low priority as these are mostly installation-time decisions.
If you wish to hide some fields which you don't want to confuse your system, then you can do something like this models/zzz_local.py
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
Roles
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/zzz.py
favicon.ico
& robots.txt
These can be provided via 2 different means:
- mod_rewrite
web2py/routes.py
: copyroutes.example.py
& edit
loadingAnimation.gif
This thickbox file needs a hardcoded full path (relative paths don't work), so if you rename your app to somethign other than 'sahana' then you should amend
static/scripts/S3/thickbox.js
static/scripts/S3/thickbox.min.js
static/scripts/S3/thickbox.compressed.js
Themes
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
Logo:
- copy new logo to
static/img
- point to this using Admin Panel
Footer:
- 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:
- The CDN may have faster/closer servers to the client
- Increases the number of files being downloaded simultaneously, since pulled from different hostnames: http://www.websiteoptimization.com/speed/tweak/parallel/
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
- Use YSlow Firefox plugin to analyse the site
- Ensure images are optimised: http://tools.dynamicdrive.com/imageoptimizer/index.php
- Compress JavaScript: http://compressorrater.thruhere.net
- Use Slimmer on HTML/CSS?
- GZip static files in Apache: http://developer.yahoo.com/performance/rules.html#gzip
- Set Expires on static files in Apache
- Use MySQL or PostgreSQL instead of SQLite
- Disable DB migrations in
00_db.py
: migrate = False - Bytecode compile the application
- Enable caching
- return response.render('customview.html', data=data): http://groups.google.com/group/web2py/msg/39210d40d8a729c0
- http://groups.google.co.uk/group/web2py/browse_thread/thread/218bb58c96883578
- Clustering with Pound: http://www.web2pyslices.com/main/slices/take_slice/33 (Discussion)
Attachments (5)
- migrate (449 bytes ) - added by 14 years ago.
- compile (99 bytes ) - added by 14 years ago.
- w2p (67 bytes ) - added by 14 years ago.
- build (83 bytes ) - added by 14 years ago.
- pull (571 bytes ) - added by 14 years ago.
Download all attachments as: .zip