pushed
zhengqunkoo/pythonanywhere.com • 4:04 AM - Nov 27, 2025
This fixes a real form-submission bug in the scratchpad UI by replacing action="." with {{ url_for('handle_comments') }} in templates/main_page.html. The previous relative form action was brittle in Flask because trailing-slash handling can make the browser POST to a URL the route doesn't actually accept, leading to “Method Not Allowed” errors. Using url_for makes the template target the exact registered endpoint, so comment posting should now work reliably in practice.
