django-fluent / django-fluent-comments Goto Github PK
View Code? Open in Web Editor NEWA modern, ajax-based appearance for django comments
Home Page: https://django-fluent.org/
License: Apache License 2.0
A modern, ajax-based appearance for django comments
Home Page: https://django-fluent.org/
License: Apache License 2.0
I'm getting this error:
Operations to perform:
Synchronize unmigrated apps: facebook_comments, allauth, flatpages, chap, django_extensions, impersonate, sponsor, dbtemplates, fluent_comments, sites, contenttypes, crispy_forms, django_comments, django_proofread, sessions, reversion, auth, disqus, inspiration, league, account, admin, challenge, debug_toolbar, django_wysiwyg, team, organization, constance
Apply all migrations: easy_thumbnails
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations needed.
Traceback (most recent call last):
File "/home/humitos/Source/chap/chap/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 427, in execute_from_command_line
utility.execute()
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 141, in handle
changes = autodetector.changes(graph=executor.loader.graph)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/db/migrations/autodetector.py", line 36, in changes
changes = self._detect_changes()
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/db/migrations/autodetector.py", line 53, in _detect_changes
old_apps = self.from_state.render(ignore_swappable=True)
File "/home/humitos/.virtualenvs/chap/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 68, in render
raise InvalidBasesError("Cannot resolve bases for %r" % new_unrendered_models)
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<django.db.migrations.state.ModelState object at 0x7f0ac398f350>]
...
ipdb> new_unrendered_models[0]
<django.db.migrations.state.ModelState object at 0x7f702e039350>
ipdb> new_unrendered_models[0].name
u'FluentComment'
ipdb>
If I remove django-fluent-comments from my INSTALLED_APPS the error dissappears.
TypeError: $form is undefined
$form.find('.comment-waiting').hide().stop();
jquery-2.1.4.min.js (line 4)
ajaxcomments.js (line 435, column 9)
Is it possible to extend the FluentComment model, or the underlying Comment model at all? I have a system where I would like comments to be votable and I would like to use a mixin on the Comment model - but keep everything else about this app. Is this possible without a fork/custom install?
Support following email threads, to visitors can receive notifications.
Pip has the version 0.9.2 which has a few issues with newer Django releases. I used some time researching fixes for these out of my own stupidity. Regardless I humbly request that you'd add some info of this near the pip install instructions.
I only noticed that the fixes were present in GitHub after coming to report them.
I found an error trying to create replies for parent posts.
Using reply link generated: reply doesn't add into reply form input: id_parent their parent id.
So I had override ajaxcomments.js and change into function showThreadedReplyForm, this variable assignment: var comment_id = $a.data('comment-id'); for var comment_id = $a[0].attributes['data-comment-id'].nodeValue;
Now it works properly.
Hi, I tried the example with threaded comment, and found that it can't show the hierarchy in the right way. And i confirmed the comment data with admin, found that the parent info hasn't been saved.
When the Django-admin is behind an https site (and the rest not), the moderate/delete links in the email don't work.
This might be a django.contrib.comments issue though.
Hi,
is there any way to display just the necessary fields to allow only authenticated users to post comments.
Django's comments framework documentation is not very precise about this https://docs.djangoproject.com/en/dev/ref/contrib/comments/#providing-a-comment-form-for-authenticated-users
Any idea on how to use that with both crispy and your project ?
Regards,
Olivier.
How to display only limited information after posting comment? Like I don't want to display the time and date, where to modify in ajaxcomments.js file? Or somewhere else? @vdboor
When under a same post, if one posts a comments with the same content what is already in one of the previous comments of his own then its is NOT getting saved in the database. Please help! @vdboor
.js-comments-form-orig-position .comment-cancel-reply-link {
display: none;
}
should be .js-comments-form-orig-position, .comment-cancel-reply-link
Hello,
if I fetch additional comment form via ajax I need to reinitialize the plugin. What would be the best way to do that ? I have endless scrollable feed with content which user can comment on , as the user scrolls down the new content is fetched with the comment form.
Thanks,
Jorge
akismet
is breaking the install on Python 3
$ pip install django-fluent-comments node:system
Collecting django-fluent-comments
Using cached django_fluent_comments-1.0.5-py2.py3-none-any.whl
Collecting akismet>=0.2 (from django-fluent-comments)
Using cached akismet-0.2.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/tp/d0cgdkdd1c32w57b4c_kl9d40000gn/T/pip-build-4au2m7mf/akismet/setup.py", line 5, in <module>
import akismet
File "/private/var/folders/tp/d0cgdkdd1c32w57b4c_kl9d40000gn/T/pip-build-4au2m7mf/akismet/akismet.py", line 136
except Exception, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/tp/d0cgdkdd1c32w57b4c_kl9d40000gn/T/pip-build-4au2m7mf/akismet
honzakral/django-threadedcomments@02616c3
Imports need to be updated.
As suggested in #3 (comment),
it's valuable to allow a simple configuration of form fields.
This makes it easier to configure which fields should be displayed in the form.
I'm getting following error when
FLUENT_COMMENTS_USE_EMAIL_NOTIFICATION = True is set.
Traceback (most recent call last):
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
return func(request, *args, **kwargs)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/fluent_comments/views.py", line 98, in post_comment_ajax
request = request
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 170, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/fluent_comments/models.py", line 38, in on_comment_posted
send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipient_list, fail_silently=True)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/__init__.py", line 62, in send_mail
connection=connection).send()
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/message.py", line 255, in send
return self.get_connection(fail_silently).send_messages([self])
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 95, in send_messages
sent = self._send(message)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 109, in _send
message = email_message.message()
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/message.py", line 221, in message
msg = SafeMIMEText(self.body, self.content_subtype, encoding)
File "/home/web/webapps/kronika/local/lib/python2.7/site-packages/django/core/mail/message.py", line 126, in __init__
MIMEText.__init__(self, text, subtype, charset)
File "/usr/lib/python2.7/email/mime/text.py", line 30, in __init__
self.set_payload(_text, _charset)
File "/usr/lib/python2.7/email/message.py", line 226, in set_payload
self.set_charset(charset)
File "/usr/lib/python2.7/email/message.py", line 268, in set_charset
cte(self)
File "/usr/lib/python2.7/email/encoders.py", line 73, in encode_7or8bit
orig.encode('ascii')
AttributeError: 'HttpResponse' object has no attribute 'encode'
Django 1.5.5
threadedcomments pypi version
Any idea ?
It would be nice to add a rating for comments and notifications about new comments
Maybe I'm misunderstanding what the example app is supposed to do. I created an article using the admin, and it has "enable comments" checked. When I view it on the site, no comment form is displayed.
The documentation does not say how to use the example though, so I'm probably doing something wrong.
I am trying to use django-fluent-comments along with Django 1.6. I tried following their github README tutorial for setting it up but some features like threaded comments and AJAX are not working.
my settings.py has this
INSTALLED_APPS += (
'fluent_comments',
'crispy_forms',
'django.contrib.comments',
'threadedcomments',
)
COMMENTS_APP = 'fluent_comments'
urls.py has this
urlpatterns += patterns('',
url(r'^blog/comments/', include('fluent_comments.urls')),
)
my template post_details.html
<html>
{% load comments %}
<head>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}fluent_comments/css/ajaxcomments.css" />
</head>
<body>
<h1>{{post.title}}</h1>
<p>{{post.body}}</p>
<script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/jquery-1.10.1.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/ajaxcomments.js"></script>
{% render_comment_list for object %}
{% render_comment_form for object %}
</body>
</html>
I can see the comments that I post. But the features that are not working are
How do I enable these features ?
How to display only limited information after posting comment? Like I don't want to display the time and date, where to modify in ajaxcomments.js file? Or somewhere else? @vdboor
instead of append new comment.
My workaround:
$newCommentTarget.append()
instead of
$newCommentTarget.html()
Please forgive me if here is not the right place to ask this question, but i didn't find any answer on stackoverflow or similar sites. also maybe this is something related to code so ..
As far as i understand commenting framework use signals for moderation purposes. In django_comments.moderation.py module in connect method of Moderator class there are to signal listeners that act on signals sended by "django_comments.get_model()" which in this case is "fluent_comments.models.FluentComment". but when posting a comment using the post_comment view of django_comments.views.comments.py module, in the section of sending the signal, the sender is comment.class which resolves to "django_comments.models.Comment" and therefore the signal get ignored(I guess!)
Any suggestion or clue where might be the source of problem?
I attach code snippets for convenience.
django_comments.moderations.py:
when i submit a comment with Chinese characters in the user_name field, it goes with the "please wait ..." signal, but then nothing happens.
i tried with English in the user_name field, it functioned as it supposed to.
when i closed the akismet (delete the akismet_api_key in the settings.py), it also worked.
i cannot figure out where my app is wrong because i take actions exactly as your guide in the configuration page.
if you have time, please help me check about this. thanks.
Hi guys,
I was having an issue using threadedcomments, it seems that the one you guys used is 0.5 and it seems to be not working at least with django 1.8, the error was:
from django.utils.encoding import force_unicode
ImportError: cannot import name 'force_unicode'
When manually installing django-threadedcomments everythings went smooth. Is there a way to manualy remove the built in package of this apps ? I don,t want to have 2 of this package in my site-package
It will be nice to have at least a note about this issue
Hi there,
I am having some trouble getting AJAX comments to work in my application. I want to have threaded comments with AJAX so that it gives feedback on the same page to the user, but instead I am being redirected to /blog/comments/posted/?c=[comment number]
. This is the link designated by the default django comments app actually, and I am not sure why this is happening. If I look on my page, I can see the ajax template is partially loaded - The "Post" button alongside of "cancel reply" exists beneath the form, which is in the ajax template, but when I actually use it, I get the redirect.
Here is my setup. I'm only displaying the code I have relevant to implementing this app.
In my settings.py
, I have:
INSTALLED_APPS += (
# Adding Threaded Comments app
'fluent_comments',
'crispy_forms',
'threadedcomments',
'django_comments',
'django.contrib.sites'
)
COMMENTS_APP = 'fluent_comments'
In my urls.py
, I have added:
urlpatterns = patterns('',
# Adding Threaded Comments app
url(r'^articles/comments/', include('django_comments.urls')),
url(r'^blog/comments/', include('fluent_comments.urls'))
)
Next, I have overwritten some of the templates for my custom use case, but the changes are often minor.
In /templates/comments/base.html
I have:
{% load i18n %}
{% block headtitle %}{% block title %}{% trans "Responses for page" %}{% endblock %}{% endblock %}
{% block main %}
<div id="comments-wrapper">
{% block content %}{% endblock %}
</div>
{% endblock %}
In /templates/comments/form.html
I have:
{% load comments i18n crispy_forms_tags fluent_comments_tags %}{% load url from future %}
{% if not form.target_object|comments_are_open %}
<p>{% trans "Comments are closed." %}</p>
{% else %}
<form id="comment-form-{{ form.target_object.pk }}" data-object-id="{{ form.target_object.pk }}" action="{% comment_form_target %}" method="post" class="{{ form.helper.form_class|default:'js-comments-form comments-form form-horizontal' }}"
data-ajax-action="{% url 'comments-post-comment-ajax' %}">
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
{% crispy form %}
<div class="form-group">
<div class="col-sm-10">
<input type="submit" name="post" class="btn btn-primary" value="{% trans 'Post' %}" />
{% ajax_comment_tags for form.target_object %}
</div>
</div>
</form>
{% endif %}
In /templates/comments/comment.html
I have:
{% load i18n %}
{% load comments %}
{% load fluent_comments_tags %}
{% load friendly_loader %}
{% friendly_load avatar_tags %}
<article class="col-md-12 comment" style="{% if forloop.counter %}{% if forloop.counter|divisibleby:2 %}background-color: #EEE;{% endif %}{% endif %}">
<div class="avatar pull-left"><a href="{{ comment.user.get_absolute_url }}">{% avatar comment.user 40 %}</a></div>
<p class="comment-description">
{{ comment.comment|linebreaks }}
<div class="comment-author">
<p style="margin-top: -10px;">{% trans 'By' %} <a href="{{ comment.user.get_absolute_url }}" rel="author">{{ comment.user }}</a> on <time>{{ comment.submit_date|date:"M j, Y" }}</time></p>
</div>
{% if user.is_authenticated %}
<a href="#form_post_comment_div{{ comment.id }}" class="btn btn-primary btn-xs" id="c{{ comment.id }}" role="button" data-toggle="collapse">Reply</a>
{% endif %}
</p>
</article>
In /templates/fluent_comments/templatetags/threaded_list.html
I have:
{% comment %}
The template for threadedcomments, spiced up.
This is included via comments/list.html
The id="comments-..." is required for JavaScript,
the 'comments/comment.html template is also used by the Ajax view.
{% endcomment %}
{% load threadedcomments_tags %}
<div id="comments-{{ target_object_id }}" data-object-id="{{ target_object_id }}" class="comments {% if not comment_list %} empty{% endif %}">
{% for comment in comment_list|fill_tree|annotate_tree %}
{% ifchanged comment.parent_id %}{% else %}</li>{% endifchanged %}
{% if not comment.open and not comment.close %}</li>{% endif %}
{% if comment.open %}<ul class="comment-list-wrapper">{% endif %}
<li class="comment-wrapper">
{% include "comments/comment.html" %}
{% if user.is_authenticated %}
<div class="collapse" id="form_post_comment_div{{ comment.id }}">{% render_comment_form for resource with comment.id %}</div>
{% endif %}
{% for close in comment.close %}</li></ul>{% endfor %}
{% endfor %}
</div>
So basically everything works as I expect it to. The only thing that isn't working is that I get a redirect when hitting the "Post" button rather than updating within the page as I expect. I don't have a custom template code for the ajax comments, so it should be the default template:
{% load i18n %}
<a href="#c0" class="comment-cancel-reply-link">{% trans "cancel reply" %}</a>
<span class="comment-waiting" id="comment-waiting-{{ target_object.pk }}" style="display: none;">
<img src="{{ STATIC_URL }}fluent_comments/img/ajax-wait.gif" alt="" class="ajax-loader" />{% trans "Please wait . . ." %}
</span>
<span class="comment-added-message" id="comment-added-message-{{ target_object.pk }}" style="display: none;">{% trans "Your comment has been posted!" %}</span>
<div class="comment-moderated-message" id="comment-moderated-message-{{ target_object.pk }}" style="display: none;">{% trans "Your comment has been posted, it will be visible for other users after approval." %}</div>
Basically, Line 3 and after of the ajax template don't work - but I know the template is in fact being loaded because the "cancel reply" appears, and only if I have the ajax template in my code. Have I missed something, or is there a bug with the ajax template?
I'm using django-fluent-comments in combination with django-threadedcomments to allow adminstrators to comment on a particular model within the standard Django admin change form for that model. The model in question isn't visible on the public site, and so get_absolute_url
is not defined on the model.
The admin.py
for django-fluent-comments includes the object_link
field which is a callable which in turn calls object.get_absolute_url()
. If the model in question doesn't have that method defined, then the whole admin screen crashes.
It might be better if there was a setting to enable the developer to control whether the object_link
points to get_absolute_url
or to the admin change form. For example:
def object_link(self, comment):
object = comment.content_object
title = unicode(object)
if appsettings.USE_ADMIN_URL:
info = (object._meta.app_label, object._meta.module_name)
url = reverse('admin:%s_%s_change' % info, args=(self.pk,))
else:
url = object.get_absolute_url()
return u'<a href="{0}">{1}</a>'.format(escape(url), escape(title))
Another alternative would be to allow the developer to define a callable in settings.py and use that instead.
I'm happy to prepare a pull request if it helps.
Hello! I'm trying to render multiple comment forms on a single page and it all works fine in terms of posting a comment and rendering them, but the real problem lies in the was the comment is posted via AJAX. When posting a comment, it is appended to the very first comment container on the page rather than the one it is meant to be appended to, on page refresh, however, it appears in the right spot. I'm not very good with javascript and I had a bit of a poke around to try and get it appending it to the correct container but I'm not so sure how to go about this. Could anyone help me out on this? Thanks :)
I'm not sure what I have done wrong, but I get at least 5 spam comments per day, if not more. I followed the example project when setting it up. This is my settings.py
:
INSTALLED_APPS = (
'fluent_comments',
'threadedcomments',
'crispy_forms',
'django.contrib.comments',
)
FLUENT_COMMENTS_EXCLUDE_FIELDS = ('url', 'title')
FLUENT_CONTENTS_USE_AKISMET = True
COMMENTS_APP = 'fluent_comments'
FLUENT_COMMENTS_USE_EMAIL_MODERATION = True
FLUENT_COMMENTS_MODERATE_AFTER_DAYS = 7
FLUENT_COMMENTS_AKISMET_ACTION = 'moderate'
AKISMET_API_KEY = 'my-key'
AKISMET_IS_TEST = False
The template is pretty standard:
{% load comments %}
{% get_comment_count for object as count %}
{% if count %}
<div class='comments-title'>Comments on "{{ object.name }}":</div>
<hr />
{% else %}
<div class='comments-none'>
There are no comments yet.
</div>
{% endif %}
{% render_comment_list for object %}
{% render_comment_form for object %}
models.py:
from fluent_comments.moderation import moderate_model, comments_are_open, comments_are_moderated
from fluent_comments.models import get_comments_for_model, CommentsRelation
class Blog(models.Model):
name = models.CharField(max_length=50)
date = models.DateTimeField()
slug = models.SlugField()
... etc...
moderate_model(
Blog,
publication_date_field='date',
enable_comments_field='enable_comments'
)
Is this standard, or am I missing something? I have registered with Akismet, I have the correct Akismet api key in the settings, and I have Akismet 0.2.0 installed on the server (pypi). I'm on Django 1.4.2 with Fluent-comments 0.8.0 and Threaded-comments 0.9.0.
This is about 5 days worth of spam in my comments section:
What to do? Also, the spam comments aren't deleted or moderated after the 7 day period set in the settings.py.. Thanks for any assistance!
Hello there, thanks for sharing your code.
I get the following error when i try to use {% render_comment_form %}.
Any help?
TemplateSyntaxError at /project/uwjeazhyqt/udxsvbatow/
'crispy_forms_tags' is not a valid tag library: Template library crispy_forms_tags not found, tried django.templatetags.crispy_forms_tags,django.contrib.staticfiles.templatetags.crispy_forms_tags,django.contrib.admin.templatetags.crispy_forms_tags,fluent_comments.templatetags.crispy_forms_tags,django.contrib.comments.templatetags.crispy_forms_tags,django.contrib.humanize.templatetags.crispy_forms_tags,board.templatetags.crispy_forms_tags
Request Method: GET
Request URL: http://127.0.0.1:8000/project/uwjeazhyqt/udxsvbatow/
Django Version: 1.4
Exception Type: TemplateSyntaxError
Exception Value:
'crispy_forms_tags' is not a valid tag library: Template library crispy_forms_tags not found, tried django.templatetags.crispy_forms_tags,django.contrib.staticfiles.templatetags.crispy_forms_tags,django.contrib.admin.templatetags.crispy_forms_tags,fluent_comments.templatetags.crispy_forms_tags,django.contrib.comments.templatetags.crispy_forms_tags,django.contrib.humanize.templatetags.crispy_forms_tags,board.templatetags.crispy_forms_tags
Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py in load, line 1043
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
Server time: Wed, 13 Jun 2012 09:42:39 -0500
Error during template rendering
In template /home/smanastirliu/workspace/lemuse/fluent_comments/templates/comments/form.html, error at line 1
'crispy_forms_tags' is not a valid tag library: Template library crispy_forms_tags not found, tried django.templatetags.crispy_forms_tags,django.contrib.staticfiles.templatetags.crispy_forms_tags,django.contrib.admin.templatetags.crispy_forms_tags,fluent_comments.templatetags.crispy_forms_tags,django.contrib.comments.templatetags.crispy_forms_tags,django.contrib.humanize.templatetags.crispy_forms_tags,board.templatetags.crispy_forms_tags
1 {% load comments i18n crispy_forms_tags fluent_comments_tags %}{% load url from future %}
2
3
When sites have a nice login/registration system, it's useful to disable anonymous comments. This should be configurable in a settings variable.
There's a "bug" in postgreSQL (in fact, it's more a feature: strong typed, contrary to MySQL which is "weakly typed", since PostgreSQL 8.3):
Now if you've got:
models.py
class ArticlesTable(models.Model):
id = models.IntegerField(primary_key=True)
comments_set = CommentsRelation()
...
and if you want to display the Articles, for which there's comment, for example, you do:
views.py
latest_comments = ArticlesTable.objects.filter(comments_set__isnull=False)
But PostgreSQL doesn't like that!
error:
ProgrammingError at /
operator does not exist: integer = text
LINE 1: ...ango_comments" ON ( "articles_articlesTable"."id" = "django_...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
How can we avoid this error when using simple filtering?
Hint here: http://stackoverflow.com/questions/16044754/heroku-postgresql-django-comments-tastypie-no-operator-matches-the-given-na
But I don't now how to change that...
Is there a way how to disable posting comments for anonymous users ?
Thanks,
Jorge
should say add "fluent_comments" to installed apps instead
Hi there,
Is there a reason this wonderful app isn't deployed on pypi ? :)
Regards,
Olivier.
imports in models.py fail, code has been moved to https://github.com/django/django-contrib-comments
Received by email:
Congratulation on your great django-fluent-comments app.
I wonder if you have planned extending it to support multiple comment models (like is done here: https://github.com/twig/django_model_comments).
This is really useful, because with multiple comment models we can have completely different types of comments.
Just an idea.
Seems like a neat idea to me!
There is a problem with the cancel reply
link when using threadedcomments
and jQuery 1.9.1:
Uncaught ReferenceError: data is not defined
at line 173 of ajaxcomments.js
(The form stays where it is)
function cancelThreadedReplyForm(event) {
if(event)
event.preventDefault();
var object_id = data['object_id']; // <= Exception here
var $form = $('#comment-form-' + object_id);
resetForm($form);
}
I am running the example code, and after enabling the threadedcomments, its showing reply link next to the comment. Though while saving the reply comment, it stores as new independent comment and also doesn't show under hierarchy.
I'll investigate further and check the issue, meanwhile if anyone aware of this issue, or configuration issue on my side, please let me know.
The threaded comments preview is still displayed at the bottom of the comment list. This should be displayed within the <ul><li>
structure.
(needs fixing before releasing 1.0 / 0.10)
Using jQuery 1.9.1:
Getting this error:
Uncaught TypeError: Object [object Object] has no method 'live'
in ajaxcomments.js
line 24
.live
was depreciated in jQuery 1.7 and removed in 1.9 (see: http://api.jquery.com/live/).
How to limit the number of comments to be displayed and add button of "Load More" to see more comments? @vdboor
fluent_comments_tags.py:120: RemovedInDjango110Warning: render() must be called with a dict, not a Context.
return self.nodelist.render(context)
Warning on running server:
site-packages/django/forms/widgets.py:143: RemovedInDjango18Warning: FluentCommentsAdmin.queryset
method should be renamed get_queryset
.
.new(mcs, name, bases, attrs))
site-packages/django/forms/widgets.py:143: RemovedInDjango18Warning: FluentCommentsAdmin.queryset
method should be renamed get_queryset
.
.new(mcs, name, bases, attrs))
Now that honzakral/django-threadedcomments#39 is merged, it's possible to use django-threadedcomments
as drop-in replacement of django.contrib.comments
. I'd love to see full support for threaded comments in the templates.
Using some smart template tags, can can be made generic and Just Work(tm).
I can't get the app to work. That's what is poping out when I try to runserver
*RuntimeError: Conflicting 'fluentcomment' models in application 'fluent_comments' class fluent_comments.models.FluentComment and <class app.flucom.fluent_comments.models.FluentComment *
.
Hi,
trying to use the app with django>=1.4 and within a generic view, i stumbled upon a key error in your template tag, because it expected the request to be available within the context.
So i needed to add
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
)
to my settings.py, for everything to work out as expected.
Regards,
Olivier.
Have you considered rewriting the thing to a proper jQuery plugin?
Right now it is just a bunch functions in the global namespace. It would be nice to convert it to a configurable plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.