Flask / SAMPLE ARTICLE
Turning a Flask exercise into Field Notes
A blog needs publishing, persistence, and something worth reading.
Field Notes began as a Flask learning project with accounts, posts, and comments. Preparing it for a public portfolio required checking the complete path from a form submission to a database row and back to a readable page.
Identity is not display text
A post belongs to a user through an integer foreign key. Storing the author's name in that field breaks the relationship. The corrected publishing flow stores the user ID and displays the related author's name.
Publishing is a separate permission
Registering an account permits participation in comments. Editorial access is configured separately. No account becomes an editor just because it was the second person to register.
Writes need deliberate requests
Deleting content now requires a POST request with CSRF protection. Comments render as plain text, while article HTML passes through an allowlist before display.
Deployment is more than a successful build
A deployed application can connect to a database and still fail because its tables do not exist. Database initialization and an editor account are part of launch, alongside the code and hosting configuration.