idea - template debug comments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by jvanasco (@jvanasco)
i have an idea for template debugging that I think might prove useful -- "debug comments"
mako doesn't print line comments in this format:
## line comment
i propose a second comment form, something like :
##! debug comment
if the template (or template lookup) is configured with "debug_comments=True" , then that line (excluding the prefix) would be rendered. otherwise it will be stripped.
the rationale for this, is that it often makes sense to have extra html comments in a development/staging machine, but not on a production environment.
if this sounds good, and a prefix can be decided on, i think i can implement it and submit a PR. (though it'll happen after my sqlalchemy workload)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the template and template lookup configuration paths, focusing on how comments are parsed and how options such as debug_comments could be passed. Decide the comment prefix and the behavior when debugging is enabled or disabled, then add coverage for both rendering cases and confirm the proposed syntax works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100