mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
fix: password generation command line crash
This commit is contained in:
parent
e360ee7dfb
commit
c2fc33a8ca
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,7 @@ import random
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import click
|
import click
|
||||||
from flask.cli import FlaskGroup
|
from flask.cli import FlaskGroup, with_appcontext
|
||||||
|
|
||||||
from ihatemoney.models import Project, db
|
from ihatemoney.models import Project, db
|
||||||
from ihatemoney.run import create_app
|
from ihatemoney.run import create_app
|
||||||
|
@ -33,6 +33,7 @@ def runserver(ctx):
|
||||||
|
|
||||||
|
|
||||||
@click.command(name="generate_password_hash")
|
@click.command(name="generate_password_hash")
|
||||||
|
@with_appcontext
|
||||||
def password_hash():
|
def password_hash():
|
||||||
"""Get password from user and hash it without printing it in clear text."""
|
"""Get password from user and hash it without printing it in clear text."""
|
||||||
password = getpass.getpass(prompt="Password: ")
|
password = getpass.getpass(prompt="Password: ")
|
||||||
|
|
Loading…
Reference in a new issue