2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 07:47:13 +00:00

Convert codebase for python3 usage

This commit is contained in:
Philip Sargent
2020-05-24 01:57:06 +01:00
committed by Wookey
parent 35f85c55f1
commit 50d753a87b
38 changed files with 288 additions and 261 deletions

View File

@@ -1,8 +1,22 @@
from localsettings import * #inital localsettings call so that urljoins work
import os
import urlparse
import urllib.parse
import django
from localsettings import *
#inital localsettings call so that urljoins work
#Imports should be grouped in the following order:
#Standard library imports.
#Related third party imports.
#Local application/library specific imports.
#You should put a blank line between each group of imports.
print("** importing settings.py")
print("--**-- REPOS_ROOT_PATH: ", REPOS_ROOT_PATH)
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
@@ -10,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = [u'expo.survex.com']
ALLOWED_HOSTS = ['expo.survex.com']
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
@@ -48,10 +62,10 @@ ADMIN_MEDIA_PREFIX = '/troggle/media-admin/'
CAVEDESCRIPTIONS = os.path.join(EXPOWEB, "cave_data")
ENTRANCEDESCRIPTIONS = os.path.join(EXPOWEB, "entrance_data")
MEDIA_URL = urlparse.urljoin(URL_ROOT , '/site_media/')
SURVEYS_URL = urlparse.urljoin(URL_ROOT , '/survey_scans/')
PHOTOS_URL = urlparse.urljoin(URL_ROOT , '/photos/')
SVX_URL = urlparse.urljoin(URL_ROOT , '/survex/')
MEDIA_URL = urllib.parse.urljoin(URL_ROOT , '/site_media/')
SURVEYS_URL = urllib.parse.urljoin(URL_ROOT , '/survey_scans/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT , '/photos/')
SVX_URL = urllib.parse.urljoin(URL_ROOT , '/survex/')
# top-level survex file basename (without .svx)
SURVEX_TOPNAME = "1623"
@@ -169,5 +183,5 @@ TINYMCE_COMPRESSOR = True
MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
from localsettings import * #localsettings needs to take precedence. Call it to override any existing vars.
from localsettings import *
#localsettings needs to take precedence. Call it to override any existing vars.