diff --git a/HISTORY.rst b/HISTORY.rst index 1e328be..b7d44dc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.8.4 (2015-12-23) +++++++++++++++++++ + +* Fix createsuperuser command + 0.8.4 (2015-12-21) ++++++++++++++++++ diff --git a/djangocms_installer/django/__init__.py b/djangocms_installer/django/__init__.py index 92cc4a4..34a43fa 100644 --- a/djangocms_installer/django/__init__.py +++ b/djangocms_installer/django/__init__.py @@ -411,11 +411,6 @@ def setup_database(config_data): [sys.executable, '-W', 'ignore', 'manage.py', 'migrate'], ) - if not config_data.no_user and not config_data.noinput: - sys.stdout.write('Creating admin user\n') - commands.append( - [sys.executable, '-W', 'ignore', 'manage.py', 'createsuperuser'] - ) if config_data.verbose: sys.stdout.write( 'Database setup commands: %s\n' % ', '.join([' '.join(cmd) for cmd in commands]) @@ -424,6 +419,12 @@ def setup_database(config_data): output = subprocess.check_output(command, env=env) sys.stdout.write(output.decode('utf-8')) + if not config_data.no_user and not config_data.noinput: + sys.stdout.write('Creating admin user\n') + subprocess.check_call(' '.join( + [sys.executable, '-W', 'ignore', 'manage.py', 'createsuperuser'] + ), shell=True) + def load_starting_page(config_data): """