Opened 18 years ago
Closed 18 years ago
#3799 closed (fixed)
Lorem ipsum template tag
Reported by: | Sascha Peilicke | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | Lorem ipsum, Template, Debug mode | |
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
Hello, everybody knows the "Lorem ipsum ..." text usually used to test templates. Wouldn't it be good to have a django built-in variable which displays this text. I have to test lots of templates and pasting this text in and deleting later is silly work. You could use it if you declare some blocks in your "base.html" and fill them with "Lorem ipsum" per Default, so that everybody can see how a template looks and works. I think it would be best if this placeholder is only displayed in DEBUG-mode.
here is an example of what i mean:
<body>
{%block content %}{{ placeholder }}{{% endblock %}
</body>
instead of
<body>
{%block content %}content goes here{{% endblock %}
</body>
Attachments (1)
Change History (15)
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 18 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 18 years ago
Has patch: | set |
---|
Sounded fun, so I did it. Doesn't currently do the "only displayed in DEBUG-mode." request, so push it back if this was part of accepted decision.
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 18 years ago
follow-up: 12 comment:9 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Doesn't look like django.utils.lorem_ipsum
was checked in. Can a committer fix this please?
comment:10 by , 18 years ago
I'd prefer this tag to be in django.contrib
rather than being a built-in tag. It's nice, but it's not fundamentally necessary. I'll make that change.
follow-up: 13 comment:11 by , 18 years ago
Just an FYI for SmileyChris: In the attached patch, some of the functions in the lorem_ipsum.py
module define variables whose names are the same as the functions themselves. Although it works, it's kinda sketchy, so I'm changing the internal variable names.
comment:12 by , 18 years ago
Replying to SmileyChris:
Doesn't look like
django.utils.lorem_ipsum
was checked in. Can a committer fix this please?
Bother. I didn't have a good night with this ticket... :-)
It looks like Adrian is picking up the ball on this one. I'll leave him to it.
comment:13 by , 18 years ago
Replying to adrian:
... define variables whose names are the same as the functions themselves. Although it works, it's kinda sketchy...
Thanks, I'll avoid that in the future.
comment:14 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
FYI, there is a Lorem ipsum template tag posted on djangosnippets.org.