Skip to main content

django-messagegroups

Build status PyPI download stats

This Django app provides a template tag to render all messages (sent via the Django messaging framework) and to display them grouped by category.

Since tag v0.2, django-messagegroups is compatible with Bootstrap 1, and since v0.3, it uses Bootstrap 2/3 markup.

Django support:

1.4+

Python support:

2.6–2.7, 3.3+

Install

The best way to install django-messagegroups is using pip:

pip install django-messagegroups

To get the current development version, you can install the version from Github:

pip install -e git://github.com/dbrgn/django-messagegroups.git#egg=messagegroups

Finally add messagegroups to your INSTALLED_APPS setting.

Usage

{% load messagegroups %}
...
{% render_messages messages %}

Customize

You can customize the template by overriding the messagegroups.html template. Just make sure that your app is in the INSTALLED_APPS list before the messagegroups app.

Here’s a list based example:

{% if messages %}
    <ul>
    {% for key, values in messages.items %}
        <li>Level {{ key.0 }} (Tags: {{ key.1 }}): {{ values|join:" | " }}</li>
    {% endfor %}
    </ul>
{% endif %}

The default HTML class markup is compatible with the Bootstrap CSS Framework (2/3).

Credits

Inspired by Ben Tappin (via mrben.co.uk).

License

The MIT License (MIT)

Copyright (c) 2011-2016 Danilo Bargen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for django-messagegroups 0.4.5

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

Source distribution (sdist)

Source distribution for django-messagegroups 0.4.5
File Size Uploaded
django-messagegroups-0.4.5.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-messagegroups 0.4.5
File Interpreter ABI Platform
django_messagegroups-0.4.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 11.7 kB

Release files / django-messagegroups-0.4.5.tar.gz

Download URL django-messagegroups-0.4.5.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1e5721701fee760ea7307332ec692d42f141c16dd850bd8bddd88e6e820f19b7
BLAKE2b-256 checksum
How to use checksums
510e74fda0d4b5a07e01224dcf81e84fd27f921ee98c210345e787d24fd3acff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_messagegroups-0.4.5-py2.py3-none-any.whl

Download URL django_messagegroups-0.4.5-py2.py3-none-any.whl
Size 7.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ae926fc988ab87ad9f8f38cc7b00cd0e9661ab899244d19684d50c4d01fef6d0
BLAKE2b-256 checksum
How to use checksums
d75e0f7376e50cbc479372cc780c189b4a9664d68067d1ba07d4e01d9e9b3507
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.5 This release

2 release files

0.4.4

3 release files

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

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