@@ -287,6 +287,7 @@
#
# Note that for sqlite3, 'name', below is a path to the filename. For other backends, it is the database name.
# Note for Oracle, options={'threaded':true} must be set in order to avoid crashes.
+ # Note for Oracle, you can use the Oracle Service Name by setting "port=0" and then "name=<host>:<port>/<service_name>".
## engine=sqlite3
## host=
## port=
@@ -294,6 +294,7 @@
# Note that for sqlite3, 'name', below is a a path to the filename. For other backends, it is the database name.
@@ -41,6 +41,14 @@ def coerce_database(database):
return str(database)
+def coerce_port(port):
+ port = int(port)
+ if port == 0:
+ return ''
+ else:
+ return port
+
HTTP_HOST = Config(
key="http_host",
help=_("HTTP host to bind to."),
@@ -271,8 +279,8 @@ DATABASE = ConfigSection(
PORT=Config(
key='port',
help=_('Database port.'),
- type=int,
- default=0,
+ type=coerce_port,
+ default='0',
),
OPTIONS=Config(
key='options',