From 813c50652ee51bb2468605a5f5257f3d591632a4 Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Sat, 14 Jun 2008 02:26:14 +0000 Subject: [PATCH] Splitting some of the stuff out of settings.py into settings_common.py (new file) to hold directives that need to be versioned. It sucks having to tell people to re-build their settings.py file from settings.py.dist when changes are made. --- apps/website/webcontext.py | 2 -- settings.py.dist | 53 +++++--------------------------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/apps/website/webcontext.py b/apps/website/webcontext.py index 08c7aa8fb..de77a1c69 100644 --- a/apps/website/webcontext.py +++ b/apps/website/webcontext.py @@ -1,4 +1,3 @@ -from django.conf import settings import gameconf def general_context(request): @@ -7,5 +6,4 @@ def general_context(request): """ return { 'game_name': gameconf.get_configvalue('site_name'), - 'media_url': settings.MEDIA_URL, } diff --git a/settings.py.dist b/settings.py.dist index 90de59dfe..487f195a0 100755 --- a/settings.py.dist +++ b/settings.py.dist @@ -1,3 +1,5 @@ +import settings_common + # A list of ports to listen on. Can be one or many. GAMEPORTS = [4000] @@ -106,35 +108,7 @@ ADMIN_MEDIA_PREFIX = '/media/amedia/' # Make this unique, and don't share it with anybody. # NOTE: If you change this after creating any accounts, your users won't be # able to login, as the SECRET_KEY is used to salt passwords. -SECRET_KEY = 'fsd&lkj^LKJ8398200(@)(38919#23892(*$*#(981' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', -) - -# MiddleWare are semi-transparent extensions to Django's functionality. -# see http://www.djangoproject.com/documentation/middleware/ for a more detailed -# explanation. -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.middleware.doc.XViewMiddleware', - 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', -) - -# Context processors define context variables, generally for the template -# system to use. -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.core.context_processors.auth', - 'django.core.context_processors.debug', - 'django.core.context_processors.i18n', -# 'django.core.context_processors.media', Broken, what's up? - 'apps.website.webcontext.general_context', -) +SECRET_KEY = 'changeme!(*#&*($&*(#*(&SDFKJJKLS*(@#KJAS' # The name of the currently selected web template. This corresponds to the # directory names shown in the webtemplates directory. @@ -147,20 +121,7 @@ TEMPLATE_DIRS = ( "%s/webtemplates/%s" % (BASE_PATH, ACTIVE_TEMPLATE), ) -# Global and Evennia-specific apps. This ties everything together so we can -# refer to app models and perform DB syncs. -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.sites', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.admin', - 'django.contrib.flatpages', - 'apps.config', - 'apps.objects', - 'apps.helpsys', - 'apps.genperms', - 'apps.news', - 'apps.website', -) - +TEMPLATE_LOADERS = settings_common.TEMPLATE_LOADERS +MIDDLEWARE_CLASSES = settings_common.MIDDLEWARE_CLASSES +TEMPLATE_CONTEXT_PROCESSORS = settings_common.TEMPLATE_CONTEXT_PROCESSORS +INSTALLED_APPS = settings_common.INSTALLED_APPS