Opened 15 years ago
Closed 14 years ago
#15092 closed Bug (fixed)
Built-in template tags "now" don't accept simple quote
| Reported by: | ninja_otoko | Owned by: | nobody |
|---|---|---|---|
| Component: | Template system | Version: | 1.2 |
| Severity: | Normal | Keywords: | template tags, now |
| 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
Using templatetag 'now' with argument betwen simple quote
{% now 'Y' %}
Raise an error:
'now' statement takes one argument
Attachments (3)
Change History (13)
comment:1 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
by , 15 years ago
| Attachment: | fix_now.patch added |
|---|
comment:3 by , 15 years ago
| Owner: | changed from to |
|---|
comment:4 by , 15 years ago
| Has patch: | set |
|---|
comment:5 by , 15 years ago
| Patch needs improvement: | set |
|---|---|
| Severity: | → Normal |
| Type: | → Uncategorized |
Your patch for {% now %} looks good however I don't understand why you're adding a test for {% ifequal %}. If you've got a good reason to add that test, then please describe it in a new ticket, and also resubmit a new patch for this ticket solely addressing the {% now %} bug.
comment:6 by , 15 years ago
| Type: | Uncategorized → Bug |
|---|
comment:7 by , 14 years ago
| Easy pickings: | unset |
|---|---|
| Patch needs improvement: | unset |
| UI/UX: | unset |
I'm attaching an updated patch. It breaks one test: 'now02', but I'm not convinced by that test at all, nor by 'now03' and 'now04' that are commented out since they were introduced, at the merge of magic-removal.
I'm suggest to remove these tests and normalize the behavior of {% now ... %} as shown in the attached patch.
by , 14 years ago
| Attachment: | 15092.patch added |
|---|
comment:8 by , 14 years ago
Just a proposal with two more tests. Apart from that, I'm considering this as RFC.
comment:9 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Fixes bug