This commit is contained in:
Matthias Mair 2022-05-20 13:37:12 +02:00
parent 74726f0fda
commit ddc4ef3c38

View File

@ -63,11 +63,12 @@ def manage(c, cmd, pty=False):
cmd - django command to run
"""
result = c.run('cd "{path}" && python3 manage.py {cmd}'.format(
c.run('cd "{path}" && python3 manage.py {cmd}'.format(
path=managePyDir(),
cmd=cmd
), pty=pty)
@task
def plugins(c):
"""
@ -83,6 +84,7 @@ def plugins(c):
# Install the plugins
c.run(f"pip3 install -U -r '{plugin_file}'")
@task(post=[plugins])
def install(c):
"""
@ -94,6 +96,7 @@ def install(c):
# Install required Python packages with PIP
c.run('pip3 install -U -r requirements.txt')
@task
def setup_dev(c):
"""
@ -111,6 +114,7 @@ def setup_dev(c):
# Update all the hooks
c.run('pre-commit autoupdate')
@task
def shell(c):
"""
@ -452,7 +456,7 @@ def delete_data(c, force=False):
Warning: This will REALLY delete all records in the database!!
"""
print(f"Deleting all data from InvenTree database...")
print("Deleting all data from InvenTree database...")
if force:
manage(c, 'flush --noinput')