django-comments

Passing Variables to Django Comment Views

Alright, I know I've asked similar questions, but I feel this is hopefully a bit different. I'm integrating django.comments into my application, and the more I play with it, the more I realize it may not even be worth my while at the end of the day. That aside, I've managed to add Captcha to my comments, and I've learned that customizing...

Django comments reverse relationship

When using django.contrib.comments is there anyway to add the reverse relationship to a model that has comments? For example: post = Post.objects.all()[0] comments = post.comments.all() ...

Extending Django commenting system

This is how I want commenting to work on my site: if the user is logged in, they are presented with an "add comments" box which has a text field for the comment text, and a checkbox that will post the comment anonymously if checked if the user is not logged in, it will present the user with everything above, plus an extra text field wh...

Django Comments: Want to remove user URL, not expand the model. How to?

I'm totally understanding the documentation on expanding the Comments app in Django, and really would like to stick with the automatic functionality but... In the current app, I have absolutely no use for an "URL" to be submitted along with a comment. Being minimally invasive of the default setup, how can I prevent this field from sho...

Django Comment, append symbol to the url comment?

Hi guys, im using the comment system, now, i would like to re-write the segment form the url comment and append a symbol #, i want to move the page seccion to the comment list exactly to the last comment user with <a name=#{{comment.id}}?> username </a> Im using next for redirect the usen when the comment was posted: {% get_comment_for...

Django comment moderation, not public

Hi guys, im trying moderation comment form the book of James Bennett, i think that all is fine, but the moderation comment is just for SPAM and the comments are public.. so , how ill put the comments always not public, i need that just the administrator can do public the comments. Thanks import datetime from Paso_a_Paso.akismet import...

Errors creating generic relations using content types (object_pk)

I am working to use django's ContentType framework to create some generic relations for a my models; after looking at how the django developers do it at django.contrib.comments.models I thought I would imitate their approach/conventions: from django.contrib.comments.models, line 21): content_type = models.ForeignKey(ContentType, ...

Customizing django-comments

So, I'm using django.contrib.comments. I've installed it OK but rather than the unwieldy default comment form, I'd like to use a custom form template that just shows a textarea and submit button. The rationale behind this is that user only see the form if they area already authenticated, and I'd like the keep the form simple and pick up...

Django 1.1 - comments - 'render_comment_form' returns TemplateSyntaxError

Hello, I want to simply render a built-in comment form in a template, using Django's builtin commenting module, but this returns a TemplateSyntaxError Exception. I need help debugging this error, please, because after googling and using the Django API reference, I'm still not getting any farther. Info: This is the template '_post.htm...

Where to put Django comments moderation code?

I am implementing the stock Django comments to an existing site. I'd like comments to appear in multiple apps and models and have all the comments behave the same - i.e. an email sent, plus other bits (listening to 'flag' signals and dealing with accordingly) Where's the best place to put my custom moderator code? I understand that ...

Django threadedcomments - registered users

Hello everyone I am planning to use Django's comment system (with the threadedcomments app). Since I only allow registered users to post, the mandatory user/url/email fields are not needed (just want a ForeignKey(User)). I have a feeling I am not the first (nor the 1000th) to do this, can anyone point me to any implementations ? ...

Modifiying a Django view for a certain project

So I simply want to use the delete() from the django.contrib.comments.views.moderation module, but only allowing the users with permission to delete their comments. In order to do this, all I have to do is uncomment #@permission_required("comments.delete_comment"), but I want to be able to do this without modifying the django framework. ...

Allowing users to delete their own comments in Django

I am using the delete() function from django.contrib.comments.views.moderation module. The staff-member is allowed to delete ANY comment posts, which is completely fine. However, I would also like to give registered non-staff members the privilege to delete their OWN comment posts, and their OWN only. How can I accomplish this? ...

Django - Two templates inheriting same parent, but nesting one another too?

I'm having some trouble with template inheritance. What I'm trying to achieve is a threaded comment system (using Django's comment framework). This requires comments who's DOM structure virtually identical to be nested. Here's the general layout of the issue: B and C inherit A C is nested inside of B (with include) Template D includes ...

How to extend the comments framework (django) by removing unnecesary fields?

Hi, I've been reading on the django docs about the comments framework and how to customize it (http://docs.djangoproject.com/en/1.1/ref/contrib/comments/custom/) In that page, it shows how to add new fields to a form. But what I want to do is to remove unnecesary fields, like URL, email (amongst other minor mods.) On that same doc page ...

Django comments being spammed

Hi, I am using the built in comment system with Django but it has started to be spammed. Can anyone recommend anything I can use to stop this such as captcha for django etc. I'm looking for something that I can use along with the comment system rather than replacing it. Thanks ...

Custom template for Django's comments application does not display fields

Hi, I want to use django.contrib.comments in a blogging application and customize the way the form is displayed. My problem is that I can't get the fields to display although displaying the hidden fields works just fine. I had a look at the docs and compared it with the regular way of displaying forms but honestly I don't know why the ...

How do I get django comments to join on auth_user

I'm using the django comments framework, and when I list the comments I want to include some of the information stored in auth_user. However, I find I need an extra query for each comment to get the user info. I tried using select_related() when I pull the comments, but this doesn't help. Is there a reason that it's not joining the aut...

Django "comment_was_flagged" signal

Hello, This is my first time working with django signals and I would like to hook the "comment_was_flagged" signal provided by the comments app to notify me when a comment is flagged. This is my code, but it doesn't seem to work, am I missing something? from django.contrib.comments.signals import comment_was_flagged from django.core...

How to automatically accept comments from authenticated users in django.contrib.comments

Is there a way to make Django automatically set the is_public field of the comment as True. I only allow comments for registered users and would like to skip manual review of comments posted. ...