Skip to content

Commit

Permalink
Fix createsuperuser command
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Dec 23, 2015
1 parent 5aaf694 commit b690e2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

0.8.4 (2015-12-23)
++++++++++++++++++

* Fix createsuperuser command

0.8.4 (2015-12-21)
++++++++++++++++++

Expand Down
11 changes: 6 additions & 5 deletions djangocms_installer/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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):
"""
Expand Down

0 comments on commit b690e2f

Please sign in to comment.