Django Richcomments
Django app extending the builtin comments framework for AJAX style commenting.
django-richcomments wraps the Django’s comments frameworks existing render_comment_list and render_comment_form template tags to make them behave AJAXy.
Installation
Install or add django-richcomments to your Python path.
Configure Django’s comments framework as described here.
Add richcomments url include to your project’s urls.py file:
(r'^richcomments/', include('richcomments.urls')),Ensure django-richcomments static media is accessible, see managing static files.
Usage
django-richcomments simply wraps the existing render_comment_list and render_comment_form template tags to make them behave AJAXy. Thus when a comment is submitted it is done via Javascript and an existing comment list is update without a page reload. You would customize your comment listing and form HTML as per normal. From a code perspective commenting behaves exactly the same as it normally does, except that the form generated by the render_comment_form tag will be submitted via AJAX and comment lists generated by the render_comment_list will be updated via AJAX after such a submit.
For richcomments to be active on a page both the jQuery and jQuery form plugin Javascript libraries needs to be loaded. Both are included as part of django-richcomments static media and a shortcut template tag is provided for your convenience, i.e.:
{% load richcomments %}
{% richcomments_static %}
which renders the following (with a static path as configured in your settings):
<script type="text/javascript" src="/static/richcomments/includes/jquery.min.js"></script> <script type="text/javascript" src="/static/richcomments/includes/jquery.form.js"></script>
To recap here’s a simple example illustrating how you can display a list of comments as well as a comment form for an object which will be submitted and updated via AJAX:
{% load comments richcomments %}
<html>
<head>
{% richcomments_static %}
</head>
<body>
{% render_comment_list for object %}
{% render_comment_form for object %}
</body>
</html>
Changelog
0.0.2 (2011-09-15)
Documentation, static media tag.
0.0.1 (2010-08-03)
Initial release
Metadata
Release files for django-richcomments 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-richcomments-0.0.2.tar.gz | 46.3 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_richcomments-0.0.2-py2.7.egg | Legacy Egg format | - | - | Details |
| django_richcomments-0.0.2-py2.6.egg | Legacy Egg format | - | - | Details |
Total release size: 147.2 kB
Release files / django-richcomments-0.0.2.tar.gz
| Download URL | django-richcomments-0.0.2.tar.gz |
|---|---|
| Size | 46.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
076cd31c6c92f542adda9c9f89822719ab2442bb5a8978f9aa638d2043cbe358
|
|
BLAKE2b-256 checksum How to use checksums |
fb9be6eaf652eac4fd3432fb79dc6da06aa1024671697a5ca60bf62e8639b09c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_richcomments-0.0.2-py2.7.egg
| Download URL | django_richcomments-0.0.2-py2.7.egg |
|---|---|
| Size | 50.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
85cc575dfb899bf734dd2097ec57da5d79294a86b8a722d4884c46cc3b87a7ad
|
|
BLAKE2b-256 checksum How to use checksums |
bd96ce4134c9247b7724d6dd788b70bc6f9230f4e12e1a597835c807d78946bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_richcomments-0.0.2-py2.6.egg
| Download URL | django_richcomments-0.0.2-py2.6.egg |
|---|---|
| Size | 50.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
e8493793316603c7b8971b25b120471b90cd5f14dc6d490df3f958f14503cac8
|
|
BLAKE2b-256 checksum How to use checksums |
62f2f8f805e4f4366e06eafcb83c6757a0c5fe8382158b571df98b6821e01852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |