mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
Move expo user settings out of databasereset.py to localsettings where they really belong
This commit is contained in:
parent
480541ae54
commit
057b09dca9
@ -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.SYSADMIN_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()
|
||||||
|
@ -15,6 +15,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')
|
||||||
|
@ -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