CS1999 Buggy Racing tech notes

Technical notes for working on your CS1999 Buggy Editor project

Identifying the template to edit


The first thing to do is to update the <form> tag in the HTML. Because the editor is a small app it's relatively straightforward to find the relevant template in the code — but you should also be able to work it out by inspecting the URL you see in the browser:

screenshot of form

That tells you the route on the webserver to that page, that you got to by clicking on a link on the preceding page. Your browser sent the request to GET /new. That's enough information to identify the code that is invoked for route /new with request method GET: specific line (27) in app.py:

return render_template("buggy-form.html")

That's how you know which template you need to edit on the webserver to change that form.

The templates directory is the default location for templates in Flask applications.

That's how you know you need to edit templates/buggy-form.html.