Opened 16 years ago
Closed 11 years ago
#7467 closed New feature (fixed)
[Improvement] Easier way to overwite the admin welcome message
Reported by: | Owned by: | Tay Ray Chuan | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | t.django@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description
To change the prominent visual welcome in admin/base.html div user-tools, one must copy the entire admin/base.html template and modify just one line. A block containing this welcome i.e. block userwelcome
would be useful for customization.
Attachments (1)
Change History (14)
comment:1 by , 16 years ago
milestone: | → post-1.0 |
---|---|
Summary: | admin/base.html needs block userwelcome for customization without copying → [Improvement] Easier way to overwite the admin welcome message |
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 15 years ago
I second this. There are languages that use different form for vocative, thus "Welcome, Vlada" is incorrect. I think this form could fit to the majority:
{% trans 'User: ' %} {% if user.first_name %}<strong>{{ user.first_name }} {{ user.last_name }}</strong> {% else %}{{ user.username }}{% endif %}.
It does not matter how to reach it, but currently AFAIK the only way is to override entire admin/base.html, which is complex.
If this applies to your language to, please vote for this.
comment:5 by , 15 years ago
Cc: | added |
---|
comment:6 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I'll attach a patch to make it possible to override the default welcome message.
Thus, one could do:
{% extends '/path/to/default/admin/templates/admin/base.html' %} {% block welcome-msg %} <strong>{% firstof user.first_name user.username %}</strong>, {% trans 'welcome!' %} {% endblock %} That said, I'm not against the "re-phrasing" of the message.
comment:7 by , 15 years ago
Has patch: | set |
---|
comment:8 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:9 by , 13 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Design decision needed → Accepted |
UI/UX: | unset |
comment:10 by , 11 years ago
Easy pickings: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Accepted → Unreviewed |
comment:11 by , 11 years ago
Changing to unreviewed as there seems to be no comments by others [in a while, and based on the new version].
comment:12 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
@kamu - Unreviewed means that nobody has looked at the ticket. Several people *have* looked at this ticket, so it has been accepted.
If you want to know more about the Trac ticket states, see the documentation on contributing.
comment:13 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I agree on that, but according to 1.0 policy I think that it will be postponed after Django 1.0 is released.
Changing summary to clarify that this is an improvement.