Created
January 27, 2025 14:11
-
-
Save klazuka/b1dc15ce5f6f3dffe7d1a8424c9879cd to your computer and use it in GitHub Desktop.
Prompt for ChatGPT Operator to create a new Python web app in Github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new Github repository called recipes-html. In the new repository, write a Python web app using FastApi. Use github's built-in text editor to write code and commit it to the repository. The web app should be configured such that every api route handler takes www form data as the input, extracting the form based on the handler function's parameters. And the handler's return a string with content type "text/html". (by default FastApi uses JSON for both requests and responses but we are making an old school web app). | |
Use jinja2 to template the html. And the base HTML template should import htmx. Import htmx like this: <script src="https://unpkg.com/[email protected]" integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script> | |
The application should provide basic CRUD operations for a recipe management website. And the HTML should use htmx so that it can send data to the server and update parts of the DOM without doing a full-page reload. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment