Things should be working again, minus the web stuff.

This commit is contained in:
Greg Taylor 2008-12-15 04:35:00 +00:00
parent 322c626295
commit 5249f27074
19 changed files with 44 additions and 38 deletions

View file

@ -1,7 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys
import os
from django.core.management import execute_manager 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__))))
try: try:
import settings # Assumed to be in the same directory. from game import settings
except ImportError: except ImportError:
import sys import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)

View file

@ -6,7 +6,7 @@ something.
from traceback import format_exc from traceback import format_exc
import time import time
from apps.objects.models import Object from src.objects.models import Object
import defines_global import defines_global
import cmdtable import cmdtable
import logger import logger

View file

@ -6,9 +6,9 @@ import time
from django.conf import settings from django.conf import settings
from apps.config.models import ConfigValue from src.config.models import ConfigValue
from apps.helpsys.models import HelpEntry from src.helpsys.models import HelpEntry
from apps.objects.models import Object from src.objects.models import Object
from src import defines_global from src import defines_global
from src import session_mgr from src import session_mgr
from src import ansi from src import ansi

View file

@ -13,7 +13,7 @@ if not functions_general.host_os_is('nt'):
import django import django
from apps.objects.models import Object from src.objects.models import Object
from src import scheduler from src import scheduler
from src import defines_global from src import defines_global
from src import flags from src import flags

View file

@ -1,7 +1,7 @@
""" """
These commands typically are to do with building or modifying Objects. These commands typically are to do with building or modifying Objects.
""" """
from apps.objects.models import Object, Attribute from src.objects.models import Object, Attribute
# We'll import this as the full path to avoid local variable clashes. # We'll import this as the full path to avoid local variable clashes.
import src.flags import src.flags
from src import ansi from src import ansi

View file

@ -1,7 +1,7 @@
""" """
Paging command and support functions. Paging command and support functions.
""" """
from apps.objects.models import Object from src.objects.models import Object
from src import defines_global from src import defines_global
def get_last_paged_objects(pobject): def get_last_paged_objects(pobject):

View file

@ -2,7 +2,7 @@
This file contains commands that require special permissions to use. These This file contains commands that require special permissions to use. These
are generally @-prefixed commands, but there are exceptions. are generally @-prefixed commands, but there are exceptions.
""" """
from apps.objects.models import Object from src.objects.models import Object
from src import defines_global from src import defines_global
from src import ansi from src import ansi
from src import session_mgr from src import session_mgr

View file

@ -3,7 +3,7 @@ Commands that are available from the connect screen.
""" """
from django.contrib.auth.models import User from django.contrib.auth.models import User
from apps.objects.models import Attribute, Object from src.objects.models import Attribute, Object
from src import defines_global from src import defines_global
from src.util import functions_general from src.util import functions_general

View file

@ -6,7 +6,7 @@ import datetime
from django.utils import simplejson from django.utils import simplejson
from apps.objects.models import CommChannel, CommChannelMessage from src.objects.models import CommChannel, CommChannelMessage
from src import session_mgr from src import session_mgr
from src import ansi from src import ansi

View file

@ -1,8 +1,8 @@
from django.db import models from django.db import models
from django.contrib import admin from django.contrib import admin
from apps.config.managers.commandalias import CommandAliasManager from src.config.managers.commandalias import CommandAliasManager
from apps.config.managers.configvalue import ConfigValueManager from src.config.managers.configvalue import ConfigValueManager
from apps.config.managers.connectscreen import ConnectScreenManager from src.config.managers.connectscreen import ConnectScreenManager
class CommandAlias(models.Model): class CommandAlias(models.Model):
""" """

View file

@ -28,7 +28,7 @@ ADMINS = (
MANAGERS = ADMINS MANAGERS = ADMINS
# The path that contains this settings.py file (no trailing slash). # The path that contains this settings.py file (no trailing slash).
BASE_PATH = os.path.join(os.path.abspath(os.path.split(__file__)[0]), '..') BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Path to the game directory (containing the database file if using sqlite). # Path to the game directory (containing the database file if using sqlite).
GAME_DIR = os.path.join(BASE_PATH, 'game') GAME_DIR = os.path.join(BASE_PATH, 'game')
@ -95,7 +95,7 @@ SERVE_MEDIA = True
# The master urlconf file that contains all of the sub-branches to the # The master urlconf file that contains all of the sub-branches to the
# applications. # applications.
ROOT_URLCONF = 'urls' ROOT_URLCONF = 'game.web.urls'
# Where users are redirected after logging in via contribu.auth.login. # Where users are redirected after logging in via contribu.auth.login.
LOGIN_REDIRECT_URL = '/' LOGIN_REDIRECT_URL = '/'
@ -156,7 +156,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth', 'django.core.context_processors.auth',
'django.core.context_processors.media', 'django.core.context_processors.media',
'django.core.context_processors.debug', 'django.core.context_processors.debug',
'webapps.website.webcontext.general_context', 'game.web.apps.website.webcontext.general_context',
) )
# Global and Evennia-specific apps. This ties everything together so we can # Global and Evennia-specific apps. This ties everything together so we can
@ -168,12 +168,12 @@ INSTALLED_APPS = (
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.flatpages', 'django.contrib.flatpages',
'apps.config', 'src.config',
'apps.objects', 'src.objects',
'apps.helpsys', 'src.helpsys',
'apps.genperms', 'src.genperms',
'webapps.news', #'webapps.news',
'webapps.website', #'webapps.website',
) )
# If django_extensions is present, import it and install it. Otherwise fail # If django_extensions is present, import it and install it. Otherwise fail

View file

@ -4,7 +4,7 @@ Models for the help system.
from django.db import models from django.db import models
from django.contrib import admin from django.contrib import admin
from src import ansi from src import ansi
from apps.helpsys.managers.helpentry import HelpEntryManager from src.helpsys.managers.helpentry import HelpEntryManager
class HelpEntry(models.Model): class HelpEntry(models.Model):
""" """

View file

@ -1,6 +1,6 @@
from django.contrib.auth.models import User, Group from django.contrib.auth.models import User, Group
from apps.objects.models import Object from src.objects.models import Object
from apps.config.models import ConfigValue from src.config.models import ConfigValue
def handle_setup(): def handle_setup():
# Set the initial user's username on the #1 object. # Set the initial user's username on the #1 object.

View file

@ -10,9 +10,9 @@ from django.contrib.auth.models import User
from django.db.models import Q from django.db.models import Q
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from apps.config.models import ConfigValue from src.config.models import ConfigValue
from apps.objects.exceptions import ObjectNotExist from src.objects.exceptions import ObjectNotExist
from apps.objects.util import object as util_object from src.objects.util import object as util_object
from src import defines_global from src import defines_global
class ObjectManager(models.Manager): class ObjectManager(models.Manager):

View file

@ -2,11 +2,11 @@ import re
from django.db import models from django.db import models
from django.contrib.auth.models import User, Group from django.contrib.auth.models import User, Group
from django.contrib import admin from django.contrib import admin
from apps.config.models import ConfigValue from src.config.models import ConfigValue
from apps.objects.util import object as util_object from src.objects.util import object as util_object
from apps.objects.managers.commchannel import CommChannelManager from src.objects.managers.commchannel import CommChannelManager
from apps.objects.managers.object import ObjectManager from src.objects.managers.object import ObjectManager
from apps.objects.managers.attribute import AttributeManager from src.objects.managers.attribute import AttributeManager
from src import scripthandler from src import scripthandler
from src import defines_global from src import defines_global
from src import ansi from src import ansi

View file

@ -9,7 +9,7 @@ from django.db import models
from django.db import connection from django.db import connection
from django.conf import settings from django.conf import settings
from apps.config.models import CommandAlias, ConfigValue from src.config.models import CommandAlias, ConfigValue
from src.session import SessionProtocol from src.session import SessionProtocol
from src import scheduler from src import scheduler
from src import logger from src import logger

View file

@ -10,8 +10,8 @@ from twisted.conch.telnet import StatefulTelnetProtocol
from django.contrib.auth.models import User from django.contrib.auth.models import User
from apps.objects.models import Object from src.objects.models import Object
from apps.config.models import ConnectScreen, ConfigValue from src.config.models import ConnectScreen, ConfigValue
import cmdhandler import cmdhandler
import logger import logger
import session_mgr import session_mgr

View file

@ -3,7 +3,7 @@ Session manager, handles connected players.
""" """
import time import time
from apps.config.models import ConfigValue from src.config.models import ConfigValue
from src import logger from src import logger
from src.util import functions_general from src.util import functions_general