From a70621609b2847a184d4a15acf50f877e2569b9f Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Wed, 1 Jul 2015 01:18:25 +0100 Subject: [PATCH 1/4] Move expo user settings out of databasereset.py to localsettings where they really belong --- databaseReset.py | 5 ++++- localsettingspotatohut.py | 4 ++++ localsettingsserver.py | 4 ++++ localsettingsubuntu.py | 4 ++++ localsettingswindows.py | 4 ++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/databaseReset.py b/databaseReset.py index 3a64135..7cdc44f 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -12,6 +12,9 @@ from core.models import Cave, Entrance import flatpages.models databasename=settings.DATABASES['default']['NAME'] +expouser=settings.EXPOUSER +expouserpass=settings.EXPOUSERPASS +expouseremail=settings.SYSADMIN_EMAIL def reload_db(): if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3': @@ -26,7 +29,7 @@ def reload_db(): cursor.execute("ALTER DATABASE %s CHARACTER SET=utf8" % databasename) cursor.execute("USE %s" % databasename) management.call_command('syncdb', interactive=False) - user = User.objects.create_user('expo', 'wookey@wookware.org', 'putrealpasswordinhere') + user = User.objects.create_user(expouser, expouseremail, expouserpass) user.is_staff = True user.is_superuser = True user.save() diff --git a/localsettingspotatohut.py b/localsettingspotatohut.py index 5773816..85488c7 100644 --- a/localsettingspotatohut.py +++ b/localsettingspotatohut.py @@ -15,6 +15,10 @@ DATABASES = { } } +EXPOUSER = 'expo' +EXPOUSERPASS = 'realpasshere' +EXPOUSER_EMAIL = 'wookey@wookware.org' + REPOS_ROOT_PATH = '/home/expo/' sys.path.append(REPOS_ROOT_PATH) sys.path.append(REPOS_ROOT_PATH + 'troggle') diff --git a/localsettingsserver.py b/localsettingsserver.py index 67a69e6..fe1b013 100644 --- a/localsettingsserver.py +++ b/localsettingsserver.py @@ -14,6 +14,10 @@ DATABASES = { } } +EXPOUSER = 'expo' +EXPOUSERPASS = 'realpasshere' +EXPOUSER_EMAIL = 'wookey@wookware.org' + REPOS_ROOT_PATH = '/home/expo/' sys.path.append(REPOS_ROOT_PATH) sys.path.append(REPOS_ROOT_PATH + 'troggle') diff --git a/localsettingsubuntu.py b/localsettingsubuntu.py index a6f3685..a50d208 100644 --- a/localsettingsubuntu.py +++ b/localsettingsubuntu.py @@ -12,6 +12,10 @@ DATABASES = { } } +EXPOUSER = 'expo' +EXPOUSERPASS = 'realpasshere' +EXPOUSER_EMAIL = 'wookey@wookware.org' + REPOS_ROOT_PATH = '/home/expo/expofiles/' sys.path.append(REPOS_ROOT_PATH) diff --git a/localsettingswindows.py b/localsettingswindows.py index 578b152..bb689e6 100644 --- a/localsettingswindows.py +++ b/localsettingswindows.py @@ -9,6 +9,10 @@ DATABASES = { } } +EXPOUSER = 'expo' +EXPOUSERPASS = 'realpasshere' +EXPOUSER_EMAIL = 'wookey@wookware.org' + SURVEX_DATA = 'c:\\Expo\\loser\\' CAVERN = 'cavern' THREEDTOPOS = '3dtopos' From 467ec2bcc3833dfdd1f5f78c74a3df1247e412f9 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Wed, 1 Jul 2015 01:26:04 +0100 Subject: [PATCH 2/4] sysadmin to expouser for email --- databaseReset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/databaseReset.py b/databaseReset.py index 7cdc44f..0964b79 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -14,7 +14,7 @@ import flatpages.models databasename=settings.DATABASES['default']['NAME'] expouser=settings.EXPOUSER expouserpass=settings.EXPOUSERPASS -expouseremail=settings.SYSADMIN_EMAIL +expouseremail=settings.EXPOUSER_EMAIL def reload_db(): if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3': From af2c8dd44cff4a9b837f9ec1e1f99d377f0f4acf Mon Sep 17 00:00:00 2001 From: Wookey Date: Wed, 1 Jul 2015 03:55:12 +0100 Subject: [PATCH 3/4] Fix unquoted string in troggle localsettingspotatohut.py --- localsettingspotatohut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localsettingspotatohut.py b/localsettingspotatohut.py index 85488c7..b9fcae1 100644 --- a/localsettingspotatohut.py +++ b/localsettingspotatohut.py @@ -48,7 +48,7 @@ MEDIA_URL = '/' + DIR_ROOT + 'site_media/' MEDIA_ROOT = REPOS_ROOT_PATH + '/troggle/media/' MEDIA_ADMIN_DIR = '/usr/lib/python2.7/site-packages/django/contrib/admin/media/' -JSLIB_PATH = /usr/share/javascript/ +JSLIB_PATH = '/usr/share/javascript/' TINY_MCE_MEDIA_ROOT = '/usr/share/tinymce/www/' TINY_MCE_MEDIA_URL = URL_ROOT + DIR_ROOT + 'tinymce_media/' From ad640eb70aeff47873c24e867a231d047ba1fb09 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Wed, 1 Jul 2015 18:22:25 +0100 Subject: [PATCH 4/4] Change JSLIB_PATH to JSLIB_URL and correct the path --- localsettingspotatohut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localsettingspotatohut.py b/localsettingspotatohut.py index b9fcae1..e5e91d6 100644 --- a/localsettingspotatohut.py +++ b/localsettingspotatohut.py @@ -48,7 +48,7 @@ MEDIA_URL = '/' + DIR_ROOT + 'site_media/' MEDIA_ROOT = REPOS_ROOT_PATH + '/troggle/media/' MEDIA_ADMIN_DIR = '/usr/lib/python2.7/site-packages/django/contrib/admin/media/' -JSLIB_PATH = '/usr/share/javascript/' +JSLIB_URL = URL_ROOT + 'javascript/' TINY_MCE_MEDIA_ROOT = '/usr/share/tinymce/www/' TINY_MCE_MEDIA_URL = URL_ROOT + DIR_ROOT + 'tinymce_media/'