Aparece assim no terminal
127.0.0.1 - - [15/Sep/2023 09:50:17] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [15/Sep/2023 09:50:20] "GET /novo HTTP/1.1" 200 -
[2023-09-15 09:50:25,100] ERROR in app: Exception on /criar [POST]
Traceback (most recent call last):
File "/Users/tadeu/PycharmProjects/jogoteca/venv/lib/python3.11/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/grapho/PycharmProjects/jogoteca/venv/lib/python3.11/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tadeu/PycharmProjects/jogoteca/venv/lib/python3.11/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tadeu/PycharmProjects/jogoteca/venv/lib/python3.11/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tadeu/PycharmProjects/jogoteca/jogoteca.py", line 26, in criar nome = request.form['nome'] ^^^^^^^
NameError: name 'request' is not defined 127.0.0.1 - - [15/Sep/2023 09:50:25] "POST /criar HTTP/1.1" 500 -