File "/venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/venv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 329, in pg_version with self.temporary_connection(): File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 603, in temporary_connection with self.cursor() as cursor: File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor return self._cursor() File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor self.ensure_connection() File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File "/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/venv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection connection = Database.connect(**conn_params) File "/venv/lib/python3.8/site-packages/psycopg2/__init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "db" (172.20.0.6) and accepting TCP/IP connections on port 5432? Creating superuser username=admin You have 37 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): auth, authtoken, contenttypes, core, dynamic_preferences, dynamic_preferences_users, knox, sessions, sites. Run 'python manage.py migrate' to apply them. Error #0: using @extend_schema on viewset class LoginView with parameters operation_id or operation will most likely result in a broken schema. Error #1: using @extend_schema on viewset class LogoutView with parameters operation_id or operation will most likely result in a broken schema. Error #2: using @extend_schema on viewset class LogoutAllView with parameters operation_id or operation will most likely result in a broken schema. Traceback (most recent call last): File "/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedTable: relation "core_user" does not exist LINE 1: ...user"."created_at", "core_user"."updated_at" FROM "core_user... ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 22, in main() File "manage.py", line 18, in main execute_from_command_line(sys.argv) File "/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/venv/lib/python3.8/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 79, in execute return super().execute(*args, **options) File "/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/venv/lib/python3.8/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 176, in handle error_msg = self._validate_username(username, verbose_field_name, database) File "/venv/lib/python3.8/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 234, in _validate_username self.UserModel._default_manager.db_manager(database).get_by_natural_key(username) File "/venv/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 45, in get_by_natural_key return self.get(**{self.model.USERNAME_FIELD: username}) File "/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/venv/lib/python3.8/site-packages/django/db/models/query.py", line 431, in get num = len(clone) File "/venv/lib/python3.8/site-packages/django/db/models/query.py", line 262, in __len__ self._fetch_all() File "/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1324, in _fetch_all self._result_cache = list(self._iterable_class(self)) File "/venv/lib/python3.8/site-packages/django/db/models/query.py", line 51, in __iter__ results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) File "/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql cursor.execute(sql, params) File "/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: relation "core_user" does not exist LINE 1: ...user"."created_at", "core_user"."updated_at" FROM "core_user... ^