[Django]-Radical Use of Admin's Interface

2👍

It is entirely possible to do this. You can do this with regular views, and then create templates that extend the “admin/base_site.html” template like so:

{% extends "admin/base_site.html" %}

You can also do breadcrumbs like this:

{% block breadcrumbs %}{% if not is_popup %}
    <div class="breadcrumbs">
         <a href="/admin/">Home</a> &rsaquo;
         <a href="/admin/yourpath/">Up One Level</a> &rsaquo; 
         You Are Here
    </div>
{% endif %}{% endblock %}

And then put whatever content you want inside of the “content” block.

3👍

As what Ben said, you can do this by creating a view function for your dashboard page. The view function itself can live anywhere within your project, but Django needs to know where it is (i.e. unlike the Django’s default model admin views, you need to define your view in a urls.py file that is known to Django).

One thing to add, since I’m assuming that this dashboard page is only accessible via your admin interface, you want to secure it using some of the built-in authentication decorators (e.g. login_required or permission_required).

👤Edwin

2👍

I’m using django-admin-tools for creating dashboards. It is quite easy to create custom dashboard modules with this app.

There is also an another app (nexus) with similar purposes. I haven’t tried it by myself but it looks good too.

1👍

Nexus seems like just the right thing.
I am using it myself and its very useful.
As of kow there are not alot of moudles availale, only two i think.
It was made by the guys behind Disqus

Link: Nexus

There are going to add documentation on how to add your own modules.

Hope this helps.

Leave a comment