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://lab.frogg.it/coop/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.7.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.7.1
File Size Uploaded Provenance Actions
apidev_coop_bar-1.7.1.tar.gz 6.5 kB Without provenance Details for apidev_coop_bar-1.7.1.tar.gz

Built distribution (wheel)

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

Total release size: 14.1 kB

Release files / apidev_coop_bar-1.7.1.tar.gz

Download URL apidev_coop_bar-1.7.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
49955bf050dfc9ada78611a517bce162cd37a5b6edb8c4eaf3b1ee112ee94372
BLAKE2b-256 checksum
How to use checksums
75a714d97b697bd8c564d101b5dc10a05fc67bb04a0bcc8c08b6457f836dd1c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL apidev_coop_bar-1.7.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ea672da00d73e51292f68b1c20492fb2ac2ad8a69314d886db7647270ef3f89
BLAKE2b-256 checksum
How to use checksums
83eda8b4f84684fc756c1d9e5586cc26387d3df5e45ceb4784d4d077535b3253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for apidev-coop-bar 1.7.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