#12070 closed (fixed)
Variable("a._hidden") does not raise TemplateSyntaxError
Reported by: | Johannes Dollinger | Owned by: | alexdutton |
---|---|---|---|
Component: | Template system | Version: | 1.1 |
Severity: | Keywords: | variable, filterexpression, private, underscore | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
>>> Variable("a._hidden") <Variable: 'a._hidden'> >>> FilterExpression("a._hidden", p) ... TemplateSyntaxError: Variables and attributes may not begin with underscores: 'a._hidden'
This should be consistent.
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
by , 15 years ago
Attachment: | patch-12070.diff added |
---|
Patch (Unindented '...'s to match style in other doctests)
comment:3 by , 15 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
Attached patch with two new doctests in regressiontests/templates/parser.py.
Moved the check for '._' from FilterExpression to Variable, given the former calls the latter.
No documentation needed; (hopefully ready for check-in)