Running Django in Pycharm 17.1

2019-09-25 07:10发布

问题:

I'm trying out the new Pycharm 17.1 Pro edition. I'm trying to run a Django 1.7 project. At the git-bash command line in Win 7, I can run it using:

$ python manage.py runserver

I can't figure out how to configure pycharm 1.7 to do this though. The screenshot of my setup is as above.

working config:

回答1:

In field where you have runserver write: http://127.0.0.1:8000/. Don' forget to enable Django support in Settings/Language&Frameworks/Django and set settings file, manage script and project root. Also make shure that you choose right Python interpreter(in Django server configuration) - the one which has installed Django. The easiest way to check if you have right interpreter chosen open: Settings/Project:ProjectName/Project Interpreter. It will list all installed packages for chosen interpreter.