fasthtml icon indicating copy to clipboard operation
fasthtml copied to clipboard

[DOCS] Incorrect description in Combining Routes example (“user-related views” refers to books)

Open Lach-dev opened this issue 3 weeks ago • 0 comments

Issue Type

  • [X] Existing documentation (e.g. typos, errors, outdated information)
  • [ ] Suggest new documentation that is currently missing

Current Behavior or Documentation Gaps

In the Combining Routes section of the FastHTML documentation, the example introduces a books.py module by saying it represents user-related views. However, the provided example clearly defines views related to books, not users.

“First let’s create a books.py module, that represents all the user-related views:”

But the example code directly below shows:

books_app, rt = fast_app()

books = ['A Guide to FastHTML', 'FastHTML Cookbook', 'FastHTML in 24 Hours']

@rt("/", name="list")
def get():
    return Titled("Books", *[P(book) for book in books])

This mismatch may confuse readers into believing the example relates to user account views or user modules.

Suggested Improvement or New Documentation Content

The documentation should replace the phrase “user-related views” with wording that correctly reflects the example. For exmaple,

“First let’s create a books.py module containing the views for displaying books:”

Relevant Links
https://www.fastht.ml/docs/explains/routes.html#combining-routes

Confirmation
Please confirm the following:

  • [X] I have checked the existing issues and pull requests to ensure this documentation issue hasn't been reported before.
  • [X] I have read the project's documentation and am confident this issue or suggestion is valid.

Lach-dev avatar Nov 14 '25 20:11 Lach-dev