apidev-coop_bar, configurable toolbar
===============================================
* `What is coop_bar good for?`_
* `Quick start`_
.. _What is coop_bar good for?: #good-for
.. _Quick start?: #quick-start
.. _good-for:
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:
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 <http://p.yusukekamiyamane.com/>`_ 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 <http://credis.org/>`_, FSE (European Social Fund) and Conseil Regional d'Auvergne.
Raw data
{
"_id": null,
"home_page": "https://github.com/ljean/coop-bar/",
"name": "apidev-coop-bar",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Luc Jean",
"author_email": "ljean@apidev.fr",
"download_url": "https://files.pythonhosted.org/packages/b8/3d/665c0147081df3347b7245665a0a08c4cc21eb6f6996285547ffc130b79e/apidev-coop_bar-1.6.1.tar.gz",
"platform": null,
"description": "apidev-coop_bar, configurable toolbar\n===============================================\n\n* `What is coop_bar good for?`_\n* `Quick start`_\n\n.. _What is coop_bar good for?: #good-for\n.. _Quick start?: #quick-start\n\n.. _good-for:\n\nWhat is coop_bar good for?\n------------------------------------\ncoop_bar is a django app which provides an menu bar with external auto-registred menu items.\n\n.. _quick-start:\n\nQuick start\n------------------------------------\nIn settings.py, add 'coop_bar' (with an underscore) to the INSTALLED_APPS \nIn urls.py add (r'^coop_bar/', include('coop_bar.urls')) to your urlpatterns\n\nFor each app needing to add links to coop_bar, create a coop_bar_cfg.py file\nIn this file, add a load_commands function as follows ::\n\n from django.core.urlresolvers import reverse\n from django.utils.translation import ugettext as _\n \n def django_admin_command(request, context):\n if request and request.user.is_staff: #request might be None\n return u'<a href=\"{0}\">{1}</a>'.format(reverse(\"admin:index\"), _('Admin'))\n \n def load_commands(coop_bar):\n coop_bar.register_command(django_admin_command)\n \n\nIn load_commands, you can register as much callback functions as you want. A callback (django_admin_command in the previous example)\nis just a function with request and context as args. It returns some html code to display in the bar or None.\n\nIn your base.html, add the following template tags::\n\n {% load coop_bar_tags %}\n <html>\n <head>\n ...\n {% coop_bar_headers %}\n </head>\n <body>\n ...\n {% coop_bar %}\n </body>\n\n\nLicense\n=======\n\napidev-coop_bar in a fork of credis/coop-bar (see https://github.com/credis/coop-bar).\n\n`Fugue icon set <http://p.yusukekamiyamane.com/>`_ by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.\n\napidev-coop_bar itself uses the BSD license: see license.txt\n\ncredis/coop-bar development was funded by `CREDIS <http://credis.org/>`_, FSE (European Social Fund) and Conseil Regional d'Auvergne.\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Pluggable admin bar system , works well with coop_cms",
"version": "1.6.1",
"project_urls": {
"Download": "https://github.com/ljean/coop-bar/tarball/master",
"Homepage": "https://github.com/ljean/coop-bar/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bbb07ad2dd5842862b5421e11199284b2896ade62254d6fc3002c4436031aeb7",
"md5": "da69d1d5d277534a491673292f7bbcbc",
"sha256": "391fc22c12ad25d9579fe20430129e1b7a6b022f3431539205bb10cc462dab5d"
},
"downloads": -1,
"filename": "apidev_coop_bar-1.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "da69d1d5d277534a491673292f7bbcbc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7238,
"upload_time": "2023-06-15T07:09:07",
"upload_time_iso_8601": "2023-06-15T07:09:07.517661Z",
"url": "https://files.pythonhosted.org/packages/bb/b0/7ad2dd5842862b5421e11199284b2896ade62254d6fc3002c4436031aeb7/apidev_coop_bar-1.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b83d665c0147081df3347b7245665a0a08c4cc21eb6f6996285547ffc130b79e",
"md5": "24b6dbf6b54c94e9f42e1f22cf29553e",
"sha256": "51a73015ae9e2ea157f789948005a3b176a5c09ff0dafb02eb97f70ccaf3a7e4"
},
"downloads": -1,
"filename": "apidev-coop_bar-1.6.1.tar.gz",
"has_sig": false,
"md5_digest": "24b6dbf6b54c94e9f42e1f22cf29553e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6113,
"upload_time": "2023-06-15T07:09:08",
"upload_time_iso_8601": "2023-06-15T07:09:08.644318Z",
"url": "https://files.pythonhosted.org/packages/b8/3d/665c0147081df3347b7245665a0a08c4cc21eb6f6996285547ffc130b79e/apidev-coop_bar-1.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-15 07:09:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ljean",
"github_project": "coop-bar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "apidev-coop-bar"
}