diff --git a/game/gamesrc/commands/__init__.py b/game/gamesrc/commands/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/game/gamesrc/parents/__init__.py b/game/gamesrc/parents/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/game/manage.py b/game/manage.py index 411452cc27..88f9789139 100755 --- a/game/manage.py +++ b/game/manage.py @@ -6,6 +6,16 @@ from django.core.management import execute_manager # Tack on the root evennia directory to the python path. sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +""" +If settings.py doesn't already exist, create it and populate it with some +basic stuff. +""" +if not os.path.exists('settings.py'): + print "Can't find a settings.py file, creating one for you." + f = open('settings.py', 'w') + f.write('"""\rMaster server configuration file. You may override any of the values in the\rsrc/config_defaults.py here. Copy-paste the variables here, and make changes to\rthis file rather than editing config_defaults.py directly.\r"""\r') + f.write('from src.config_defaults import *') + try: from game import settings except ImportError: diff --git a/game/settings.py b/game/settings.py deleted file mode 100644 index 9553af0187..0000000000 --- a/game/settings.py +++ /dev/null @@ -1 +0,0 @@ -from src.config_defaults import * \ No newline at end of file diff --git a/src/config_defaults.py b/src/config_defaults.py index 125f7db627..1229d2a5a3 100644 --- a/src/config_defaults.py +++ b/src/config_defaults.py @@ -35,11 +35,11 @@ GAME_DIR = os.path.join(BASE_PATH, 'game') # Absolute path to the directory that holds media (no trailing slash). # Example: "/home/media/media.lawrence.com" -MEDIA_ROOT = '%s/media' % (BASE_PATH) +MEDIA_ROOT = os.path.join(GAME_DIR, 'web', 'media') # Absolute path to the directory that has the script tree in it. (no trailing slash) # Example: "/home/evennia/src/scripts" -SCRIPT_ROOT = '%s/src/scripts' % (BASE_PATH) +SCRIPT_ROOT = os.path.join(BASE_PATH, 'src', 'scripts') # 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'. DATABASE_ENGINE = 'sqlite3' @@ -128,7 +128,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/%s" % (BASE_PATH, ACTIVE_TEMPLATE), + os.path.join(GAME_DIR, "web", "html", ACTIVE_TEMPLATE), ) # List of callables that know how to import templates from various sources. @@ -172,8 +172,8 @@ INSTALLED_APPS = ( 'src.objects', 'src.helpsys', 'src.genperms', - #'webapps.news', - #'webapps.website', + 'game.web.apps.news', + 'game.web.apps.website', ) # If django_extensions is present, import it and install it. Otherwise fail