Part one of getting troggle to work with django 1.10

Major rework of how survex is processed
This commit is contained in:
Sam Wenham
2019-07-16 00:07:37 +01:00
parent a26109cb30
commit 08a41941f9
38 changed files with 450 additions and 918 deletions

View File

@@ -8,7 +8,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Django settings for troggle project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = [u'expo.survex.com']
@@ -56,6 +55,8 @@ SVX_URL = urlparse.urljoin(URL_ROOT , '/survex/')
# top-level survex file basename (without .svx)
SURVEX_TOPNAME = "1623"
KAT_AREAS = ['1623', '1624', '1626', '1627']
DEFAULT_LOGBOOK_PARSER = "Parseloghtmltxt"
DEFAULT_LOGBOOK_FILE = "logbook.html"
@@ -96,20 +97,34 @@ SMART_APPEND_SLASH = True
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'a#vaeozn0)uz_9t_%v5n#tj)m+%ace6b_0(^fj!355qki*v)j2'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.load_template_source',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(PYTHON_PATH, 'templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request',
#'core.context.troggle_context'
]
},
},
]
if django.VERSION[0] == 1 and django.VERSION[1] < 4:
authmodule = 'django.core.context_processors.auth'
else:
authmodule = 'django.contrib.auth.context_processors.auth'
TEMPLATE_CONTEXT_PROCESSORS = ( authmodule, "core.context.troggle_context", )
LOGIN_REDIRECT_URL = '/'
INSTALLED_APPS = (
@@ -122,14 +137,13 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
#'troggle.photologue',
#'troggle.reversion',
#'django_evolution',
'tinymce',
'registration',
'troggle.profiles',
'troggle.core',
'troggle.flatpages',
'troggle.imagekit',
'imagekit',
'django_extensions',
)
MIDDLEWARE_CLASSES = (