"Django Comments Framework XTD extension app with Ajax commenting support
Project description
# django-ajax-comments-xtd
An addon app to https://github.com/danirus/django-comments-xtd that makes comments submittable via ajax
# Installation
Until I put it on Pypi, here's you install it:
1. Install dependencies:
```pip install django-comments-xtd```
2. Clone the app into your django project:
```git clone https://github.com/timonweb/django-ajax-comments-xtd.git django_ajax_comments_xtd```
3. Clean git repo:
```rm -rf django_ajax_comments_xtd/.git```
4. Add the app and its dependencies to INSTALLED_APPS:
```
INSTALLED_APPS = [
...
'django_ajax_comments_xtd',
'django_comments_xtd',
'django_comments',
...
]
```
Make sure you follow the exact order of putting these apps together
5. Add this to your url config:
```
urlpatterns = [
...
url(r'^comments/', include('tow.django_ajax_comments_xtd.urls')),
...
]
```
Note: You don't need to add urls config provided by django_comments and django_comments_xtd because our app includes them all.
6. Add JS library link to your template:
```
<script src="{% static 'django_ajax_comments_xtd/js/ajax_comments.js' %}"></script>
```
7. In your template use these tags to display a list of comments and the comment form:
```
{% load comments comments_xtd %}
...
<div id="comments">
{% render_xtdcomment_tree for object %}
{% render_comment_form for object %}
</div>
```
And now you should have ajax comments enabled.
An addon app to https://github.com/danirus/django-comments-xtd that makes comments submittable via ajax
# Installation
Until I put it on Pypi, here's you install it:
1. Install dependencies:
```pip install django-comments-xtd```
2. Clone the app into your django project:
```git clone https://github.com/timonweb/django-ajax-comments-xtd.git django_ajax_comments_xtd```
3. Clean git repo:
```rm -rf django_ajax_comments_xtd/.git```
4. Add the app and its dependencies to INSTALLED_APPS:
```
INSTALLED_APPS = [
...
'django_ajax_comments_xtd',
'django_comments_xtd',
'django_comments',
...
]
```
Make sure you follow the exact order of putting these apps together
5. Add this to your url config:
```
urlpatterns = [
...
url(r'^comments/', include('tow.django_ajax_comments_xtd.urls')),
...
]
```
Note: You don't need to add urls config provided by django_comments and django_comments_xtd because our app includes them all.
6. Add JS library link to your template:
```
<script src="{% static 'django_ajax_comments_xtd/js/ajax_comments.js' %}"></script>
```
7. In your template use these tags to display a list of comments and the comment form:
```
{% load comments comments_xtd %}
...
<div id="comments">
{% render_xtdcomment_tree for object %}
{% render_comment_form for object %}
</div>
```
And now you should have ajax comments enabled.
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
Close
Hashes for django-ajax-comments-xtd-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017967646e550e8622ee57b347a685dee30a4c84de97a59870f6f49e16404f72 |
|
MD5 | c63cbb26c91e64a238e9e69d7e5a3fd7 |
|
BLAKE2b-256 | acff9f8ba26cfe50da97df90fc71549b87b4d068368b94751bd99ea43d4324f2 |