Python manage.py runserver не подключается - PullRequest
0 голосов
/ 19 сентября 2018
python manage.py runserver

Не запущен, и вот этот ответ я получаю:

Traceback (most recent call last): File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\core\management\commands\runserver.py", line 123, in inner_run self.check_migrations() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\core\management\base.py", line 427, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\migrations\executor.py", line 18, in __init__ self.loader = MigrationLoader(self.connection) File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__ self.build_graph() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\migrations\loader.py", line 207, in build_graph self.applied_migrations = recorder.applied_migrations() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\migrations\recorder.py", line 61, in applied_migrations if self.has_table(): File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\migrations\recorder.py", line 44, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()) File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor return self._cursor() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor self.ensure_connection() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\utils.py", line 89, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Users\David\Envs\ebdjango\lib\site-packages\django\db\backends\postgresql\base.py", line 168, in get_new_connection connection = Database.connect(**conn_params) File "C:\Users\David\Envs\ebdjango\lib\site-packages\psycopg2\__init__.py", line 130, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

Не могу понять, почему сервер не подключается?Я использую django-cookiecutter Я не уверен, стоит ли менять используемый порт или это что-то еще?

Заранее спасибо за любую помощь!

1 Ответ

0 голосов
/ 19 сентября 2018

Мое программное обеспечение postgresql установлено неправильно. Спасибо @dfundako!

...