Skip to main content

"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

1. Install from PYPI:

```pip install django-ajax-comments-xtd```

2. Add the app and its dependencies to INSTALLED_APPS in settings.py:
```
INSTALLED_APPS = [
...
'django_ajax_comments_xtd',
'django_comments_xtd',
'django_comments',
...
]
```

3. Add COMMENTS_APP to your settings.py:

```
COMMENTS_APP = 'django_comments_xtd'
```

Make sure you follow the exact order of putting these apps together

4. 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.

5. Run migrations to create necessary database tables:

```
python manage.py migrate
```

6. Add JS library link to your template:
```
<script src="{% static 'django_ajax_comments_xtd/js/ajax_comments.js' %}"></script>
```

7. In templates 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-ajax-comments-xtd-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file django-ajax-comments-xtd-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-ajax-comments-xtd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4278cdd0c07861ce8cb8903bb3205b1f445b7f75f7838040490fd8e8b69719e
MD5 dcfd703a12cb5403919b36f5c4654163
BLAKE2b-256 63ac4fcc0463dba25b1129115b881cf8adffc4ad1bdffeef51d6afa4cc9aea83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page