From the course: OpenAI Codex 101: From Idea to Deployed App

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Iterate and add features

Iterate and add features

Your app has two pages and three hard-coded links. It works, but it's not useful yet. Nobody wants to edit HTML every time they add a link. Now, you're going to transform this into something that feels like a real product. You'll write multiple tasks, one after the other, each building on the last. This is how real work with Codex happens. happens. You rarely get what you need in a single task. You get there through iteration. Your first task is to add a way for users to submit links. Type this into Codex. Add a form to index.html above the links list with two input fields, one for the site name and one for the URL. Add a submit button labeled add link. In app.py, create a post route at slash add that reads the form data and stores it. For now, store links in a Python list in memory. After storing, redirect back to the homepage. Update the homepage route to pass the links list to the template and update index.html to loop through the list and display each link. Submit it and let Codex…

Contents