* needs_better_patch: 1 => 0
* easy: => 0
Comment:
I chose to use 'view site' as the link text, so it looks like the 'view on
site' text that's available on models on the admin site. Do I need to do
anything special about this new translation string? Also I'm not sure what
the {{ root_path }} thing is supposed to do, I just copied/pasted it from
base.html. It looked like some default fallback that's used everywhere.
I also implemented the link to the main page (as per adrian), as it is a
convention on most websites.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* keywords: admin url => admin url dceu2011
* stage: Accepted => Ready for checkin
Comment:
The patch looks fine to me. Personally some kind of integration with the
sites-framework would be nice, but it would add a usually unnecessary
dependency and could also be done by people who customize the admin
templates.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:13>
* stage: Ready for checkin => Accepted
Comment:
This is looking good. However, `{% url 'admin:index' %}` should always
return a url, so the conditional test and the use of `root_path` are
redundant. The template code could be simplified to:
{{{
<h1 id="site-name"><a href="{% url 'admin:index' %}">{% trans 'Django
administration' %}</a></h1>
}}}
Note that `root_path` should eventually be made completely redundant by
#15294.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:14>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:15>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:16>
Comment (by Tim Graham <timograham@…>):
In [changeset:"259a6ea82cfb8bf242449666e4b643a19e54a423"]:
{{{
#!CommitTicketReference repository=""
revision="259a6ea82cfb8bf242449666e4b643a19e54a423"
Added a link in admin branding block to admin index.
Refs #13749 and #21220.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:18>
Comment (by nemesisdesign):
So I guess this ticket can be closed, right?
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:19>
Comment (by nemesisdesign):
pull request opened on github:
https://github.com/django/django/pull/2809/files
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:20>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* needs_docs: 0 => 1
Comment:
Hi!
Patch looks good but it needs documentation (a mention in the release
notes) and some tests.
Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:21>
* needs_docs: 1 => 0
* easy: 0 => 1
* needs_tests: 1 => 0
* needs_better_patch: 1 => 0
Comment:
Hi Baptiste,
I added a line in the release notes (1.8) and added one test for the "View
site" string.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:22>
* version: 1.2 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:23>
* stage: Accepted => Ready for checkin
Comment:
Ran tests with {{{ PYTHONPATH=.. python runtests.py --settings=test_sqlite
admin_views }}} Looks ok
What about the translations for this new field? Do the translators get
informed about it automatically (is there a 'list' functionality for
untranslated fields?), or should I write a new ticket for this?
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:24>
Comment (by claudep):
No need for a ticket, if the string is marked for translation (with
`trans`), the traditional translation workflow will take care of it.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:25>
* needs_better_patch: 0 => 1
* easy: 1 => 0
* stage: Ready for checkin => Accepted
Comment:
Hi,
I've had a chance to discuss this with a few people at EuroPython and we
came to the conclusion that another approach is needed.
Create a new attribute on `Adminsite` (maybe call it `site_url`, similar
to `site_header`, `site_title`, etc) which would default to '/' and use
this in the template.
Users could customize this link to be what matches their setup (but the
default should be good enough for the general case) and even disable it if
they want (the template should check if this attribute is set and not show
any link if that's not the case).
I'll remove the `easy pickings` flag because it might be a bit more
complicated to implement it this way.
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:26>
Comment (by russellm):
It shouldn't be *that* complicated - it should just be an attribute on
AdminSite that returns reverse('%s:index" % self.name). The ability to
have multiple installations of admin was one of the design requirements
for namespaced URLs when we added them.
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:27>
* cc: areski (added)
Comment:
Here a PR that follow bmispelon suggestions:
https://github.com/django/django/pull/3103
Comments will be welcome!
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:28>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"a81af7f49de7ff3f51f111de28ed3a682f67ea89"]:
{{{
#!CommitTicketReference repository=""
revision="a81af7f49de7ff3f51f111de28ed3a682f67ea89"
Fixed #13749 -- Added link from admin site to front-end site.
Thanks romankrv for the suggestion.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13749#comment:29>