Open luminousmen opened 8 years ago
That's totally my thought! The thing is: I'm not sure if there is any way to put that link on django's original dashboard without overriding the admin template (I just don't use 'vanilla' admin). But then, if you use advanced admin apps such as django-grappelli or django-admin-tools they do provide easy ways to place any link you need. And that depends on your taste and use case.
@byashimov Cool! But I don't like useless dependencies=) There is a hack. You can create model without doing migrations and override url to dashboards. In this case you don't need to override admin templates
I've got you. But then it will appear on dash even if you do not need that, because of admin autodiscover.
You can provide a workaround in here or put it directly in docs as a pull request, say, on example page, then I will publish it on readthedocs.
For what it's worth, I did this by overriding the admin/base_site.html
template (it's small), and adding to the userlinks
block:
{% block userlinks %}
<a href="{% url 'controlcenter:dashboard' 'foo' %}">Dashboard</a> /
{{ block.super }}
{% endblock %}
the nav-global
block is also useful for this.
but it's true that this could be included in the docs somewhere...
I would be nice to have the possibility to show a link to the dashboard using just a setting.
I am wondering is it'll be a good idea to add link to
django-controlcenter
app from admin page without guessing which url I need to paste.What do you think?