forked from expo/troggle
Store expo user/password info in localsettings file, and not repeated in databaseReset script
This commit is contained in:
commit
32f3dac621
@ -12,6 +12,9 @@ from core.models import Cave, Entrance
|
|||||||
import flatpages.models
|
import flatpages.models
|
||||||
|
|
||||||
databasename=settings.DATABASES['default']['NAME']
|
databasename=settings.DATABASES['default']['NAME']
|
||||||
|
expouser=settings.EXPOUSER
|
||||||
|
expouserpass=settings.EXPOUSERPASS
|
||||||
|
expouseremail=settings.EXPOUSER_EMAIL
|
||||||
|
|
||||||
def reload_db():
|
def reload_db():
|
||||||
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3':
|
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("ALTER DATABASE %s CHARACTER SET=utf8" % databasename)
|
||||||
cursor.execute("USE %s" % databasename)
|
cursor.execute("USE %s" % databasename)
|
||||||
management.call_command('syncdb', interactive=False)
|
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_staff = True
|
||||||
user.is_superuser = True
|
user.is_superuser = True
|
||||||
user.save()
|
user.save()
|
||||||
|
@ -14,6 +14,10 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPOUSER = 'expo'
|
||||||
|
EXPOUSERPASS = 'realpasshere'
|
||||||
|
EXPOUSER_EMAIL = 'wookey@wookware.org'
|
||||||
|
|
||||||
REPOS_ROOT_PATH = '/home/expo/'
|
REPOS_ROOT_PATH = '/home/expo/'
|
||||||
sys.path.append(REPOS_ROOT_PATH)
|
sys.path.append(REPOS_ROOT_PATH)
|
||||||
sys.path.append(REPOS_ROOT_PATH + 'troggle')
|
sys.path.append(REPOS_ROOT_PATH + 'troggle')
|
||||||
|
@ -12,6 +12,10 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPOUSER = 'expo'
|
||||||
|
EXPOUSERPASS = 'realpasshere'
|
||||||
|
EXPOUSER_EMAIL = 'wookey@wookware.org'
|
||||||
|
|
||||||
REPOS_ROOT_PATH = '/home/expo/expofiles/'
|
REPOS_ROOT_PATH = '/home/expo/expofiles/'
|
||||||
|
|
||||||
sys.path.append(REPOS_ROOT_PATH)
|
sys.path.append(REPOS_ROOT_PATH)
|
||||||
|
@ -9,6 +9,10 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPOUSER = 'expo'
|
||||||
|
EXPOUSERPASS = 'realpasshere'
|
||||||
|
EXPOUSER_EMAIL = 'wookey@wookware.org'
|
||||||
|
|
||||||
SURVEX_DATA = 'c:\\Expo\\loser\\'
|
SURVEX_DATA = 'c:\\Expo\\loser\\'
|
||||||
CAVERN = 'cavern'
|
CAVERN = 'cavern'
|
||||||
THREEDTOPOS = '3dtopos'
|
THREEDTOPOS = '3dtopos'
|
||||||
|
Loading…
Reference in New Issue
Block a user