mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
web_framework: Reduce verbosity of DB migration process
During provisioning of container/VM, we need to run --list-dependencies. When run without --develop, they are unable to create database. When run with --develop, the output from the database migration process is messing up the output meant for stdin as it is outputting to stdout instead stderr. Reduce verbosity even in debug mode to fix this. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
848845c432
commit
f2d43737fa
@ -54,9 +54,8 @@ def init():
|
||||
settings.INSTALLED_APPS)
|
||||
|
||||
logger.debug('Creating or adding new tables to data file')
|
||||
verbosity = 1 if cfg.develop else 0
|
||||
django.core.management.call_command('migrate', '--fake-initial',
|
||||
interactive=False, verbosity=verbosity)
|
||||
interactive=False, verbosity=0)
|
||||
os.chmod(cfg.store_file, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)
|
||||
|
||||
# Cleanup expired sessions every day
|
||||
@ -98,6 +97,7 @@ def get_languages():
|
||||
Add additional languages that FreedomBox support but Django doesn't.
|
||||
|
||||
"""
|
||||
|
||||
def gettext_noop(string):
|
||||
"""Django's actual translation methods need Django to be setup."""
|
||||
return string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user