2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

Move expo user settings out of databasereset.py to localsettings where they really belong

This commit is contained in:
Sam Wenham 2015-07-01 01:18:25 +01:00
parent 480541ae54
commit 057b09dca9
5 changed files with 20 additions and 1 deletions

View File

@ -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()

View File

@ -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')

View File

@ -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')

View File

@ -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)

View File

@ -9,6 +9,10 @@ DATABASES = {
}
}
EXPOUSER = 'expo'
EXPOUSERPASS = 'realpasshere'
EXPOUSER_EMAIL = 'wookey@wookware.org'
SURVEX_DATA = 'c:\\Expo\\loser\\'
CAVERN = 'cavern'
THREEDTOPOS = '3dtopos'