byashimov / django-controlcenter

Set of widgets to build dashboards for Django projects
BSD 3-Clause "New" or "Revised" License
989 stars 85 forks source link

[feature request] Add admin link #3

Open luminousmen opened 8 years ago

luminousmen commented 8 years ago

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?

byashimov commented 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.

luminousmen commented 8 years ago

@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

byashimov commented 8 years ago

I've got you. But then it will appear on dash even if you do not need that, because of admin autodiscover.

byashimov commented 8 years ago

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.

PiDelport commented 6 years ago

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 %}
minusf commented 5 years ago

the nav-global block is also useful for this.

but it's true that this could be included in the docs somewhere...

fabiocaccamo commented 1 year ago

I would be nice to have the possibility to show a link to the dashboard using just a setting.