JS and HTML to support the Django contrib.messages app
Project description
jQuery messages-UI plugin package for Django
django-messages-ui adds JS and HTML to support the Django contrib.messages app. It should be called on the message list object, and accepts options for message selectors, transient messages, and close-links. Messages are added via ICanHaz.js.
Dependencies
jQuery library (http://jquery.com/)
jQuery doTimeout (http://benalman.com/projects/jquery-dotimeout-plugin/)
iCanHaz (http://icanhazjs.com/)
django-icanhaz 0.2.0+ (https://github.com/carljm/django-icanhaz)
Installation
In your Django project settings, add “messages_ui” to your INSTALLED_APPS.
Usage
Linking the JS:
<script src="{{ STATIC_URL }}messages_ui/jquery.messages-ui.js"></script>
Including the default HTML Template:
{% include "messages_ui/_messages.html" %}
Calling the plugin:
$('#messages').messages();
Adding a message in JS:
$(ich.message({message: "Sample Message", tags: "info"}).appendTo($('#messages'));
To override the default JS template, add a message.html file to a directory listed in your ICANHAZ_DIRS setting.
CHANGES
0.1.0 (2011.06.25)
Initial release.
0.1.1 (2011.06.27)
Updated HTML template (removed <aside> and moved #messages to <ul>).
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-messages-ui-0.1.1.tar.gz.
File metadata
- Download URL: django-messages-ui-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a6f6d0a36c35f273111e844b5911290c4cde959e1ddaa53e66c2f7b5027334
|
|
| MD5 |
7522c456f20bafa0ee7ce504ceb97414
|
|
| BLAKE2b-256 |
bc68bceffe6ebaead403c925cd5d071e0f7e512e7dd1b3a494be2248ca71dbfa
|