Author: tracyshaun
Date: 2005-03-22 16:11:30 -0700 (Tue, 22 Mar 2005)
New Revision: 2213
Modified:
WSGIKit/trunk/wsgikit/server.py
WSGIKit/trunk/wsgikit/urlparser.py
WSGIKit/trunk/wsgikit/webkit/wsgiwebkit.py
Log:
fixes for index names and config file location
Modified: WSGIKit/trunk/wsgikit/server.py
===================================================================
--- WSGIKit/trunk/wsgikit/server.py 2005-03-22 22:57:30 UTC (rev 2212)
+++ WSGIKit/trunk/wsgikit/server.py 2005-03-22 23:11:30 UTC (rev 2213)
@@ -45,6 +45,12 @@
if conf.get('help'):
print help()
return 0
+ conf.load_dict({'verbose': False}, default=True)
+ default_config_path = os.path.join(os.path.dirname(__file__), 'default_config.conf')
+ if os.path.exists(default_config_path):
+ if conf.verbose:
+ print "Loading the default configuration from %s." % default_config_path
+ conf.load(default_config_path, default=True)
if os.path.exists('server.conf') and not conf.get('no_server_conf'):
if conf.verbose:
print "Loading configuration from server.conf"
Modified: WSGIKit/trunk/wsgikit/urlparser.py
===================================================================
--- WSGIKit/trunk/wsgikit/urlparser.py 2005-03-22 22:57:30 UTC (rev 2212)
+++ WSGIKit/trunk/wsgikit/urlparser.py 2005-03-22 23:11:30 UTC (rev 2213)
@@ -57,7 +57,7 @@
class URLParser(object):
default_options = {
- 'index_name': 'index',
+ 'index_names': ['index', 'Index', 'main', 'Main'],
'hide_extensions': ['.pyc', '.bak', '.py~'],
'ignore_extensions': [],
'constructors': {},
Modified: WSGIKit/trunk/wsgikit/webkit/wsgiwebkit.py
===================================================================
--- WSGIKit/trunk/wsgikit/webkit/wsgiwebkit.py 2005-03-22 22:57:30 UTC (rev 2212)
+++ WSGIKit/trunk/wsgikit/webkit/wsgiwebkit.py 2005-03-22 23:11:30 UTC (rev 2213)
@@ -17,7 +17,7 @@
def webkit(directory, install_fake_webware=True, use_lint=False):
if install_fake_webware:
_install_fake_webware()
- app = urlparser.URLParser(directory, '')
+ app = urlparser.URLParser(directory, os.path.basename(directory))
if use_lint:
app = lint.middleware(app)
app = session.middleware(app)
|