From bb6905c1cac2af5ff5a7c8116aaa59baf50c141c Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Tue, 5 Jun 2007 18:07:47 +0000 Subject: [PATCH] Small fix for certain versions of Python and some simplification of the settings.py file. --- scripthandler.py | 6 +++--- settings.py.dist | 24 +++++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/scripthandler.py b/scripthandler.py index 456d6b1803..4e83fd5c22 100644 --- a/scripthandler.py +++ b/scripthandler.py @@ -58,9 +58,9 @@ def scriptlink(source_obj, scriptname): functions_general.log_infomsg('Invalid module path: %s' % (format_exc())) os.chdir(orig_path) return - finally: - # Change back to the original working directory. - os.chdir(orig_path) + + # Change back to the original working directory. + os.chdir(orig_path) # The new script module has been cached, return the reference. return modreference.class_factory(source_obj) \ No newline at end of file diff --git a/settings.py.dist b/settings.py.dist index 9f631e0c27..127dd2f40b 100755 --- a/settings.py.dist +++ b/settings.py.dist @@ -14,12 +14,21 @@ ADMINS = ( MANAGERS = ADMINS -DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'. -DATABASE_NAME = '/home/evennia/evennia/evennia.db3' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. +# The path that contains this settings.py file. +BASE_PATH = '/home/evennia/evennia' + +# 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'. +DATABASE_ENGINE = 'sqlite3' +# Database name, or path to DB file if using sqlite3. +DATABASE_NAME = '%s/evennia.db3' % (BASE_PATH) +# Unused for sqlite3 +DATABASE_USER = '' +# Unused for sqlite3 +DATABASE_PASSWORD = '' +# Empty string defaults to localhost. Not used with sqlite3. +DATABASE_HOST = '' +# Empty string defaults to localhost. Not used with sqlite3. +DATABASE_PORT = '' # Local time zone for this installation. All choices can be found here: # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE @@ -38,7 +47,7 @@ USE_I18N = False # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '/home/evennia/evennia/media' +MEDIA_ROOT = '%s/media' % (BASE_PATH) # URL that handles the media served from MEDIA_ROOT. # Example: "http://media.lawrence.com" @@ -72,6 +81,7 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + "%s/webtemplates" % (BASE_PATH), ) INSTALLED_APPS = (