I ran into the same problem that worked through a book by Miguel Greenberg. To answer the question "How to set up PyCharm" for your project, I offer the following comment.
To stay in PyCharm to take advantage of its glorious debugger, go to “Edit Configurations” and in this dialog box, make sure that you are on the “Configurations” tab. There are two upper text fields:
Script: set the path to your manage.py
Script Parameters: runningerver
By the way, I am using PyCharm 4.5.3, although I suspect that at least some of the previous releases that I worked on do the following: now starting the application from PyCharm calls the runerver command:
python manage.py runserver
and this launches the jar development server, i.e. app.run (). On the "Configuration" tab, we can specify the launch of a specific script manage.py, as well as a command line argument for use, for example. as in this case. After starting the application 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 runningerver.
In the text field of the script parameter, you can specify the shell instead of runerver, in which case you would end up in the shell after starting the application in PyCharm.
The default dispatcher (application) commands are runerver and shell. The db command is added to the following manage.py line:
manager.add_command('db', MigrateCommand)
Under this is added a team test. Pay attention to the @ manager.command decorator before def () test.
To get a list of all manager command commands (applications) on the command line:
python manage.py
If you are in the Factory application part, you should see {test, shell, db, runningerver}. To get help with any type of command:
python manage.py parameter -?