mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix invoke pty error when running 'invoke superuser'
This commit is contained in:
parent
2c1d585f8b
commit
07f7b46a8a
6
tasks.py
6
tasks.py
@ -47,7 +47,7 @@ def managePyPath():
|
||||
|
||||
return os.path.join(managePyDir(), 'manage.py')
|
||||
|
||||
def manage(c, cmd):
|
||||
def manage(c, cmd, pty=False):
|
||||
"""
|
||||
Runs a given command against django's "manage.py" script.
|
||||
|
||||
@ -59,7 +59,7 @@ def manage(c, cmd):
|
||||
c.run('cd {path} && python3 manage.py {cmd}'.format(
|
||||
path=managePyDir(),
|
||||
cmd=cmd
|
||||
))
|
||||
), pty=pty)
|
||||
|
||||
@task(help={'length': 'Length of secret key (default=50)'})
|
||||
def key(c, length=50, force=False):
|
||||
@ -106,7 +106,7 @@ def superuser(c):
|
||||
Create a superuser (admin) account for the database.
|
||||
"""
|
||||
|
||||
manage(c, 'createsuperuser')
|
||||
manage(c, 'createsuperuser', pty=True)
|
||||
|
||||
@task
|
||||
def migrate(c):
|
||||
|
Loading…
Reference in New Issue
Block a user