emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.06k stars 71 forks source link

Shell command doesn't work #212

Closed kdebowski closed 6 years ago

kdebowski commented 6 years ago

I'm going through tutorial and bumped into troubles when trying to call command from shell: weppy --app bloggy.py setup

I get response message:

Usage: weppy [OPTIONS] COMMAND [ARGS]...

Error: No such command "setup".

My bloggy.py file content: https://pastebin.com/9eP3Hqec

gi0baro commented 6 years ago

@kdebowski custom commands are loaded from the application module, so, usually, when they don't show up it means there's something wrong with your application.

Probably if you open up a shell, it will show you the error with its traceback:

weppy --app bloggy.py shell
kdebowski commented 6 years ago

@gi0baro thanks! I had some bad indentation. Everything works fine. Just to mention there some inconsistency in documentation: On tutorial page (http://weppy.org/docs/1.2/tutorial) the syntax to run command is: > weppy --app bloggy.py setup On page (http://weppy.org/docs/1.2/cli) the syntax is: > weppy --app=myapp setup.

As I can see both works. Which is preferred?

gi0baro commented 6 years ago

@kdebowski there's no difference. But thank you for spotting the difference, I will unify the notation.

I'm closing this, feel free to reopen it if you still have issues.