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.
This commit is contained in:
parent
3fe644ef17
commit
813c50652e
2 changed files with 7 additions and 48 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
from django.conf import settings
|
|
||||||
import gameconf
|
import gameconf
|
||||||
|
|
||||||
def general_context(request):
|
def general_context(request):
|
||||||
|
|
@ -7,5 +6,4 @@ def general_context(request):
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
'game_name': gameconf.get_configvalue('site_name'),
|
'game_name': gameconf.get_configvalue('site_name'),
|
||||||
'media_url': settings.MEDIA_URL,
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import settings_common
|
||||||
|
|
||||||
# A list of ports to listen on. Can be one or many.
|
# A list of ports to listen on. Can be one or many.
|
||||||
GAMEPORTS = [4000]
|
GAMEPORTS = [4000]
|
||||||
|
|
||||||
|
|
@ -106,35 +108,7 @@ ADMIN_MEDIA_PREFIX = '/media/amedia/'
|
||||||
# Make this unique, and don't share it with anybody.
|
# Make this unique, and don't share it with anybody.
|
||||||
# NOTE: If you change this after creating any accounts, your users won't be
|
# 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.
|
# able to login, as the SECRET_KEY is used to salt passwords.
|
||||||
SECRET_KEY = 'fsd&lkj^LKJ8398200(@)(38919#23892(*$*#(981'
|
SECRET_KEY = 'changeme!(*#&*($&*(#*(&SDFKJJKLS*(@#KJAS'
|
||||||
|
|
||||||
# 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',
|
|
||||||
)
|
|
||||||
|
|
||||||
# The name of the currently selected web template. This corresponds to the
|
# The name of the currently selected web template. This corresponds to the
|
||||||
# directory names shown in the webtemplates directory.
|
# directory names shown in the webtemplates directory.
|
||||||
|
|
@ -147,20 +121,7 @@ TEMPLATE_DIRS = (
|
||||||
"%s/webtemplates/%s" % (BASE_PATH, ACTIVE_TEMPLATE),
|
"%s/webtemplates/%s" % (BASE_PATH, ACTIVE_TEMPLATE),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Global and Evennia-specific apps. This ties everything together so we can
|
TEMPLATE_LOADERS = settings_common.TEMPLATE_LOADERS
|
||||||
# refer to app models and perform DB syncs.
|
MIDDLEWARE_CLASSES = settings_common.MIDDLEWARE_CLASSES
|
||||||
INSTALLED_APPS = (
|
TEMPLATE_CONTEXT_PROCESSORS = settings_common.TEMPLATE_CONTEXT_PROCESSORS
|
||||||
'django.contrib.auth',
|
INSTALLED_APPS = settings_common.INSTALLED_APPS
|
||||||
'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',
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue