Closed tdzz1102 closed 1 year ago
Thanks for spotting the missing documentation on the create-db
command.
Regarding the issue when running create-secret
, this should not happen. python-dotenv
returns an empty string in the case that the file does not exist. Do you remember which error was thrown?
I added the command
python main.py create-db
to README which I find by doingpython main.py -h
. Without doing this,python main.py create-admin <username> <password>
will throw a "table not exist" bug. I also setted a default value to secret. Settings.secret is a non-optional argument. When you runpython main.py create-secret
at first, because ".env" file doesn't exist yet, python can't find a initial value for it and throws an error. After doingpython main.py create-secret
, a ".env" file containing the secret are created and will be loaded first, so the default value will not effect anything else.