idea - template debug comments
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
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.
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)
- Dominant language
- Python
- Stars
- 459
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
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.
More from sqlalchemy/mako
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
sqlalchemy/mako#432 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sqlalchemy/mako#417 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
sqlalchemy/mako#392 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
sqlalchemy/mako#382 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
sqlalchemy/mako#376 · 9 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100