Skip to main content

apidev-coop_bar, configurable toolbar

What is coop_bar good for?

coop_bar is a django app which provides an menu bar with external auto-registred menu items.

Quick start

In settings.py, add ‘coop_bar’ (with an underscore) to the INSTALLED_APPS In urls.py add (r’^coop_bar/’, include(‘coop_bar.urls’)) to your urlpatterns

For each app needing to add links to coop_bar, create a coop_bar_cfg.py 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 and request.user.is_staff: #request might be None
        return u'<a href="{0}">{1}</a>'.format(reverse("admin:index"), _('Admin'))

def load_commands(coop_bar):
    coop_bar.register_command(django_admin_command)

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 %}
<html>
<head>
    ...
    {% coop_bar_headers %}
</head>
<body>
    ...
    {% coop_bar %}
</body>

License

apidev-coop_bar in a fork of credis/coop-bar (see https://github.com/credis/coop-bar).

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

apidev-coop_bar itself uses the BSD license: see license.txt

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

Metadata

Release files for apidev-coop-bar 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apidev-coop-bar 1.6.1
File Size Uploaded Provenance Actions
apidev-coop_bar-1.6.1.tar.gz 6.1 kB Without provenance Details for apidev-coop_bar-1.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apidev-coop-bar 1.6.1
File Interpreter ABI Platform Actions
apidev_coop_bar-1.6.1-py3-none-any.whl Python 3 none any Details for apidev_coop_bar-1.6.1-py3-none-any.whl

Total release size: 13.4 kB

Release files / apidev-coop_bar-1.6.1.tar.gz

Download URL apidev-coop_bar-1.6.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
51a73015ae9e2ea157f789948005a3b176a5c09ff0dafb02eb97f70ccaf3a7e4
BLAKE2b-256 checksum
How to use checksums
b83d665c0147081df3347b7245665a0a08c4cc21eb6f6996285547ffc130b79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / apidev_coop_bar-1.6.1-py3-none-any.whl

Download URL apidev_coop_bar-1.6.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
391fc22c12ad25d9579fe20430129e1b7a6b022f3431539205bb10cc462dab5d
BLAKE2b-256 checksum
How to use checksums
bbb07ad2dd5842862b5421e11199284b2896ade62254d6fc3002c4436031aeb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for apidev-coop-bar 1.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page