Source

Cotidia Admin Tools / README.md

Installation

pip install cotidia-admin-tools

Settings

Add the following apps to your settings, before any other app.

INSTALLED_APPS = (
    'admin_tools',
    'admin_tools.menu',
    'admin_tools.dashboard',
    'admin_tools.liststyle',
    ...
)

Administration header theme

Although it is not recommended to amend the less/css from the admin tools panel, it is possible to add exta stylesheet to override the default styles.

We recommend to apply a theme to the header & nav bar to correspond to correspond to the website/client branding.

To do so, add a base_site.html template in your template folder as such:

admin/base_site.html

Here's an example base_site.html:

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

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

{# The meta title of the admin #}
{% block meta_site_name %}Ancillary deployment{% endblock %}

{# The header title above the navigation bar #}
{% block site_name %}Ancillary deployment{% endblock %}

{# Please note, if you pass 'site_name' in your context processor, you will not need to use those two blocks, as the site_name variable will be used instead #}

{% block author_link %}<a href="http://viva-aspire.com">VIVA Aspire</a>{% endblock %}

{# Please note, if you pass 'author' & 'author_url' in your context processor, you will not need to use those two blocks, as those variables will be used instead #}

Note the the admin.theme.css will be your custom stylesheet that will overide any default style.

We recommend to override the header & nav bar using the following LESS code:

@white: #ffffff;
@headerBackgroundColor: #333333;
@headerTextColor: #ffffff;
@headerLinkColor: #999;
@headerLinkColorHover: #999;
@headerNavLinkColor: #fff;
@headerNavLinkColorHover: #333;
@headerNavLinkColorActive: #333;

#header{
    background-color: @headerBackgroundColor;
    color:@headerTextColor;

    #user-tools{
        a{
            color:@headerLinkColor;
            &:hover{
                color:@headerLinkColorHover;
            }
        }
    }
    // Normal
    .navbar .nav > li > a {
        color: @headerNavLinkColor;
        background-color: lighten(@headerBackgroundColor, 15%);
    }
    // Hover
    .navbar .nav > li > a:focus,
    .navbar .nav > li > a:hover {
        background-color: darken(@headerTextColor, 5%);
        color: @headerNavLinkColorHover;
    }

    // Active nav items
    .navbar .nav > .active > a,
    .navbar .nav > .active > a:hover,
    .navbar .nav > .active > a:focus {
        color: @headerNavLinkColorActive;
        background-color: @white;
    }

    .navbar .nav li.dropdown > .dropdown-toggle .caret {
        border-top-color: darken(@headerTextColor, 20%);
        border-bottom-color: darken(@headerTextColor, 20%);
    }

}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.