Skip to main content

Pluggable admin bar system , works well with coop-cms

Project description

coop-bar, configurable toolbar

What is coop_bar good for?

django-coop is a set of several apps for building cooperative websites. It is based on Django.

Thses apps may need a to display an admin toolbar. For example, the CMS component may use this bar to display edit, cancel and save links.

coop_bar tries to provide a simple and configurable mechanism

Quick start

In, add ‘coop_bar’ (with an underscore) to the INSTALLED_APPS Under Django 1.3, the static folder should be found automatically, as the templates folder In add (r’^coop_bar/’, include(‘coop_bar.urls’)) to your urlpatterns

For each app needing to add links to coop_bar, create a file In this file, add a load_commands function as follows

from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _

def django_admin_command(request, context):
    if request.user.is_staff:
        return u'<a href="{0}">{1}</a>'.format(reverse("admin:index"), _('Admin'))

def load_commands(coop_bar):

In load_commands, you can register as much callback functions as you want. A callback (django_admin_command in the previous example) is just a function with request and context as args. It returns some html code to display in the bar or None.

In your base.html, add the following template tags:

{% load coop_bar_tags %}
    {% coop_bar_headers %}
    {% coop_bar %}


Fugue icon set by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.

coop-bar itself uses the same license as Django (BSD).

coop-bar development was funded by CREDIS, FSE (European Social Fund) and Conseil Regional d’Auvergne.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
coop-bar-0.3.2.tar.gz (2.0 MB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page