Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Modifies the stock Django-Administration interface to fit our ideas a little bit better.

Project description

Modifies the stock Django-Administration interface to fit our ideas a little bit better.

Dashboard and global navigation extension

Allows grouping of apps on the dashboard and offers the same view on each admin page by sliding down the bar on top after a small delay when hovered.

Configuration example:

from fhadmin import FHADMIN_GROUPS_REMAINING
_ = lambda x: x

    (_('Main content'), {
        'apps': ('page', 'medialibrary', 'blog'),
    (_('Modules'), {
        'apps': ('links', FHADMIN_GROUPS_REMAINING),
    (_('Preferences'), {
        'apps': ('auth', 'rosetta', 'external', 'sites'),

The extension is activated by overriding both admin/base_site.html for the slide-down navigation and admin/index.html for the dashboard, and adding fhadmin to INSTALLED_APPS so that the template tags and static files are found. The following two templates are contained in fhadmin/templates/admin as well.


{% extends "admin/base.html" %}
{% load i18n %}

{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}fhadmin/fhadmin.css" />
{% endblock %}

{% block title %}{{ title }} | {% trans 'Django administration' %}{% endblock %}

{% block branding %}
<h1 id="site-name">{% trans 'Django administration' %}</h1>
{% endblock %}

{% block nav-global %}
<div id="quickpanel">
    {% include "admin/group_list.html" %}
    <br style="clear:both" />
{% endblock %}


{% extends "admin/base_site.html" %}
{% load i18n admin_static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}

{% block coltype %}colMS{% endblock %}

{% block bodyclass %}dashboard{% endblock %}

{% block breadcrumbs %}{% endblock %}

{% block content %}
<div id="content-main">
    {% include "admin/group_list.html" %}
    <br style="clear:left" />
{% endblock %}

{% block sidebar %}
<div id="content-related">
    <div class="module" id="recent-actions-module">
        <h2>{% trans 'Recent Actions' %}</h2>
        <h3>{% trans 'My Actions' %}</h3>
            {% load log %}
            {% get_admin_log 10 as admin_log for_user user %}
            {% if not admin_log %}
            <p>{% trans 'None available' %}</p>
            {% else %}
            <ul class="actionlist">
            {% for entry in admin_log %}
            <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
                {% if entry.is_deletion %}
                    {{ entry.object_repr }}
                {% else %}
                    <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
                {% endif %}
                {% if entry.content_type %}
                    <span class="mini quiet">{% filter capfirst %}{% trans %}{% endfilter %}</span>
                {% else %}
                    <span class="mini quiet">{% trans 'Unknown content' %}</span>
                {% endif %}
            {% endfor %}
            {% endif %}
{% endblock %}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-fhadmin, version 1.4.2
Filename, size File type Python version Upload date Hashes
Filename, size django_fhadmin-1.4.2-py2-none-any.whl (10.0 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size django-fhadmin-1.4.2.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page