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.0

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.0
File Size Uploaded Provenance Actions
apidev_coop_bar-1.7.0.tar.gz 6.2 kB Without provenance Details for apidev_coop_bar-1.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.5 kB

Release files / apidev_coop_bar-1.7.0.tar.gz

Download URL apidev_coop_bar-1.7.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0c36911382b5c7c1665f43334b7f50526b9ce9acff73a5602e0d21313964d85e
BLAKE2b-256 checksum
How to use checksums
dad3632d7b2b99c20dc0a2f3dd313b3807bb30406da6f99b1873a640629ddc60
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.0-py3-none-any.whl

Download URL apidev_coop_bar-1.7.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
573c168357326a9afb5a7bd3b01a2967b07dedc3ca1b8e9439ccf246e3e85f81
BLAKE2b-256 checksum
How to use checksums
016a283f3f91e414d28c18c11adaa48b556ea008ba68a9d42b589b44a2bc5c26
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.0

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