Back to articles
Action Buttons in Dataframes with Record-Level Routing in Shiny for Python

Action Buttons in Dataframes with Record-Level Routing in Shiny for Python

via Dev.to PythonIndia Owens

Why this is more useful than a modal This is Part 3 of the Shiny for Python: The Missing Manual series. Part 1 covered Quill.js rich text input, Part 2 covered multi-page routing with Starlette. This article builds directly on Part 2's routing setup — read that first if you haven't. Adding action buttons to a dataframe is actually reasonably documented for Shiny — if you're using R. The Python documentation is sparse, and almost every tutorial I found stops at the same place: a button that triggers a modal dialog showing the record. Modals are fine for simple use cases. But in a real internal tool, you often want something closer to how a normal web application behaves: a View button that opens a dedicated read-only page for the record, an Edit button that opens a form pre-populated with that record's data, and a Delete button that removes it in place. Each page lives at its own URL, the record ID is passed as a query parameter, and the server reads it to fetch the right data. This art

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
2 views

Related Articles