The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\options.py", line 688, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\utils\decorators.py", line 134, in _wrapper_view
response = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\views\decorators\cache.py", line 62, in _wrapper_view_func
response = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\sites.py", line 242, in inner
return view(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\options.py", line 1886, in add_view
return self.changeform_view(request, None, form_url, extra_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\utils\decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\utils\decorators.py", line 134, in _wrapper_view
response = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\options.py", line 1747, in changeform_view
return self._changeform_view(request, object_id, form_url, extra_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\options.py", line 1804, in _changeform_view
self.log_addition(request, new_object, change_message)
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\options.py", line 922, in log_addition
return LogEntry.objects.log_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\contrib\admin\models.py", line 38, in log_action
return self.model.objects.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\query.py", line 658, in create
obj.save(force_insert=True, using=self.db)
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\base.py", line 814, in save
self.save_base(
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\base.py", line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\base.py", line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\base.py", line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\models\sql\compiler.py", line 1822, in execute_sql
cursor.execute(sql, params)
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\backends\utils.py", line 102, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\backends\utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "D:\game\projects\Testing_Django\venv\Lib\site-packages\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.DataError: ОШИБКА: целое вне диапазона
[03/Nov/2023 14:07:27] "POST /admin/first/products/add/ HTTP/1.1" 500 199748