I experienced the same problem working through Miguel Grinberg's book. To answer the question How to "Configure PyCharm" for your project I offer the following comment.
To remain in PyCharm to take advantage of its glorious debugger go to Edit Configurations, and in that dialog box make sure you are on the Configurations tab. There, the two top text boxes are:
Script: set to path of your manage.py
Script parameters: runserver
By the way I am using PyCharm 4.5.3, although I suspect the following is true in at least a few of the previous releases I have worked in. Now running the application from PyCharm invokes the runserver command:
python manage.py runserver
and this runs the flask development server, i.e. app.run(). The Configuration tab has allowed us to specify running the particular script manage.py, as well as the command line argument to use, e.g. runserver as in this case. After running the app in PyCharm look at the top line in the output in the Run or Debug window and you will see among other entries: --file pathto/manage.py runserver.
You might have specified shell instead of runserver in the script parameter text box, and in that case you would have found yourself in the shell after running the app in PyCharm.
The default Manager(app) commands are runserver and shell. The db command is added in the following line of manage.py:
manager.add_command('db', MigrateCommand)
Underneath that the command test is added. Notice the @manager.command decorator prior to def test().
To get a list of all Manager(app) commands type on the command line:
python manage.py
If you are at the Application Factory part of the tutorial you should see {test, shell, db, runserver}. To get help on any one command type:
python manage.py parameter -?