Version 16 (modified by 12 years ago) ( diff ) | ,
---|
Taiwan Settings
Remember to see ConfigurationGuidelines first. And here are example configuration and settings for Taiwan development and deployment.
Basic Settings
Note: As of January 2012, BZR/Launchpad info for eden is deprecated. Please visit the GitHub page. Thanks.
After bzr checking out the codes, first time running with python web2py.py -S eden -M
should fail, but generating eden/models/000_config.py
file. Edit eden/models/000_config.py
and remember to set FINISHED_EDITING_CONFIG_FILE = True
. Here are some recommended settings:
deployment_settings.L10n.countries = ["TW"] deployment_settings.L10n.utc_offset = "UTC +0800" deployment_settings.gis.edit_L0 = False deployment_settings.gis.edit_L1 = False deployment_settings.gis.edit_L2 = False deployment_settings.gis.edit_L3 = False deployment_settings.gis.locations_hierarchy = { "L0":T("Country"), "L1":T("Province"), "L2":T("District"), "L3":T("Town"), # "L4":T("Village"), "L5":T("Location"), # Street Address "XX":T("Imported") }
To Import Admin Names for Taiwan
Add this to your Prepopulate tasks.cfg:
gis,location,TWL1.csv,location.xsl gis,location,TWL2.csv,location.xsl gis,location,TWL3.csv,location.xsl
To Enable OpenID Auth
Make sure the settings in eden/models/000_config.py
is ready:
deployment_settings.auth.openid = True
Use the file at http://www.iis.sinica.edu.tw/~marr/tmp/openid_auth.py instead of original one, placed in web2py/gluon/contrib/login_methods/openid_auth.py
.
To Enable SMS Service
- Administration -> Messaging -> Global Messaging Settings -> Default Country Code: 886
- Edit Gateway Setting.
- Patch
eden/modules/s3msg.py
.# Italy keeps 0 after country code clean = str(self.default_country_code) + clean elif self.default_country_code == 886: clean = clean else:
def dispatch_to_pe_id(pe_id): table3 = db.pr_pe_contact - query = (table3.pe_id == pe_id) & (table3.contact_method == contact_method) + query = (table3.pe_id == pe_id) & (table3.contact_method == contact_method) & (table3.deleted == False)
- Edit
eden/cron/crontab
.
To Include Microblogging Service
Modify eden/views/rssviewer.html
:
title: 'Twitter', url: 'http://twitter.com/statuses/user_timeline/123442822.rss' title: 'Plurk', url: 'http://www.plurk.com/sahanatw.xml'
To Run with WSGI
Modify web2py/wsgihandler.py
if openid_auth enabled:
import sys import os sys.stdout = sys.stderr
Edid Map Service Configuration
- Lat/Lon: 24.25, 120.65 Zoom: 7
- Google API Key and Enable/Disable Layers
Attachments (4)
- L1.csv (445 bytes ) - added by 14 years ago.
- L2.csv (7.2 KB ) - added by 14 years ago.
- L3.csv (228.0 KB ) - added by 14 years ago.
- openid_auth.py (26.5 KB ) - added by 14 years ago.
Download all attachments as: .zip