wiki:TaiwanSettings

Version 16 (modified by Jacob, 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

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.