A
A
AleksandrOst2022-03-11 20:58:05
PostgreSQL
AleksandrOst, 2022-03-11 20:58:05

Django doesn't see "createuser" commands for PostgreSQL?

I'm starting a Django project. I decided to try to work with PostgreSQL.
Installed PostgreSQL 10. Installed and opened pgAdmin4 4.30 in browser.
In the project folder Settings.py wrote:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'web_db',
'USER': 'admin_web',
'PASSWORD': '',
'HOST': 'localhostl',
'PORT': '',

I write in the PyCharm terminal in the project a command to create a user in the database:

createuser name_user

In response I get:

"createuser"

Tell me what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2022-03-11
@galaxy

There is no folder with postgres binaries in system (or pycharm's) paths.
You can also create a user in pgAdmin (and in psql).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question