Avatar ·

Project debugging in PyCharm

📁 Conditions, Advanced Python Topics, Error, example, django, AI, debug, work, project

My task is to launch a project on Django in PyCharm.

Conditions:

  • Ubuntu 13.04, Python 2.7
  • I launch the IDE from my user (for example, NISK).
  • The www-data user is used to access the database.
  • When a page is requested, the script runs as the www-data user, then a request is made to the database.

For everything to work, I start the application using the following command:

sudo -u www-data python manage.py runserver test_domain.ru:8000

After looking at the PyCharm settings, I did not find an option to set which user the script should run as. As a result, an error appears (