flask-paginate icon indicating copy to clipboard operation
flask-paginate copied to clipboard

Example: No such command 'init_db'

Open jbhanks opened this issue 3 years ago • 3 comments

Hi, is the example supposed to be self-contained (except of course for installing the necessary modules)?

I have tried to follow the instructions, but it does not run for me as-is:

(pagination_example) ➜  example git:(master) ✗ python sql.py
Usage: sql.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  fill-data  fill records to database
  init-db    initialize database and tables
(pagination_example) ➜  example git:(master) ✗ python sql.py init_db
Usage: sql.py [OPTIONS] COMMAND [ARGS]...
Try 'sql.py --help' for help.

Error: No such command 'init_db'.

I'm sure this is some basic configuration issue that I happen not to be aware of, but some help would be appreciated.

jbhanks avatar Apr 16 '21 21:04 jbhanks

it's init-db not init_db

lixxu avatar Apr 19 '21 00:04 lixxu

Thanks, that worked. You should correct the readme.md, which says init_db. It's all the more confusing because there is a function in sql.py that IS called init_db.

jbhanks avatar Apr 19 '21 02:04 jbhanks

sorry, updated.

lixxu avatar Apr 19 '21 02:04 lixxu