Просто добавлял в инпут onclick с какимто значением и выбило ошибку:
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 244, in ensure_connection
self.connect()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 225, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\postgresql\base.py", line 203, in get_new_connection
connection = Database.connect(**conn_params)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\psycopg2\__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 950, in _bootstrap_inner
self.run()
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 888, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\channels\management\commands\runserver.py", line 75, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\core\management\base.py", line 487, in check
all_issues = checks.run_checks(
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\urls\resolvers.py", line 480, in check
for pattern in self.url_patterns:
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\functional.py", line 49, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\urls\resolvers.py", line 696, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\functional.py", line 49, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\urls\resolvers.py", line 689, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Vitaliy\PycharmProjects\Funpay\Funpay\Funpay\urls.py", line 9, in <module>
path('', include('Pay.urls')),
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\urls\conf.py", line 38, in include
urlconf_module = import_module(urlconf_module)
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Vitaliy\PycharmProjects\Funpay\Funpay\Pay\urls.py", line 3, in <module>
from .views import (
File "C:\Users\Vitaliy\PycharmProjects\Funpay\Funpay\Pay\views.py", line 86, in <module>
class RegisterUser(View):
File "C:\Users\Vitaliy\PycharmProjects\Funpay\Funpay\Pay\views.py", line 90, in RegisterUser
'form_search': SearchForm(),
File "C:\Users\Vitaliy\PycharmProjects\Funpay\Funpay\Pay\forms.py", line 221, in __init__
self.count_games = Games.objects.count()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\models\query.py", line 470, in count
return self.query.get_count(using=self.db)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\models\sql\query.py", line 552, in get_count
number = obj.get_aggregation(using, ["__count"])["__count"]
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\models\sql\query.py", line 537, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1359, in execute_sql
cursor = self.connection.cursor()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 284, in cursor
return self._cursor()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 260, in _cursor
self.ensure_connection()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 244, in ensure_connection
self.connect()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 244, in ensure_connection
self.connect()
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\base\base.py", line 225, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\db\backends\postgresql\base.py", line 203, in get_new_connection
connection = Database.connect(**conn_params)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\psycopg2\__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError