I did everything according to manual. that's my settings.py:
- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'test_spatial', 'USER': 'postgre_user', 'PASSWORD': os.getenv("Password"), 'HOST': 'postgre_user-676.postgres.pythonanywhere-services.com', 'PORT': 12676, } }
from postgresql console: postgres=# CREATE USER postgre_user WITH PASSWORD ''; CREATE ROLE postgres=# ALTER ROLE postgre_user SET client_encoding TO 'utf8'; ALTER ROLE postgres=# ALTER ROLE postgre_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE postgres=# ALTER ROLE postgre_user SET timezone TO 'UTC'; ALTER ROLE postgres=# GRANT ALL PRIVILEGES ON DATABASE test_spatial TO postgre_user ; GRANT And finally i got for python manage.py migrate: django.db.utils.OperationalError: could not translate host name "postgre_user-676.postgres.pythonanywhere-services.com" to address: Name or service not known What did i do wrong?