Questions tagged [django-comments]

Django used to include a simple comments framework. Since Django 1.6, it's been separated to a separate project, use this tag for both. This framework can be used to attach comments to any model, so you can use it for comments on blog entries, photos, book chapters, or anything else.

Django used to include a simple, yet customizable comments framework. Since Django 1.6, it's been separated to a separate project, use this tag for both.

Comments are all "attached" to some parent object. This can be any instance of a Django model.

The primary interaction with the comment system is through a series of template tags that let you embed comments and generate forms for your users to post them.

Reference:

191 questions
21
votes
3 answers

heroku, postgreSQL, django, comments, tastypie: No operator matches the given name and argument type(s). You might need to add explicit type casts

I have a simple query on django's built in comments model and getting the error below with heroku's postgreSQL database: DatabaseError: operator does not exist: integer = text LINE 1: ... INNER JOIN "django_comments" ON ("pi ns_pin"."id" =…
Arctelix
  • 4,165
  • 2
  • 22
  • 36
14
votes
3 answers

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

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…
Nacho
  • 7,544
  • 15
  • 57
  • 74
13
votes
3 answers

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…
anonymous coward
  • 11,594
  • 10
  • 51
  • 89
9
votes
3 answers

django comment framework: distinct() does not work?

Running distinct() on any field of the comment model always returns all the records, Comment.objects.values('user').distinct() [{'user': 1}, {'user': 0}, {'user': 0}, {'user': 0}, {'user': 0}, {'user': 1}, {'user': 1}, {'user': 1}, {'user':…
Xun Yang
  • 3,707
  • 7
  • 33
  • 54
8
votes
1 answer

Django zinnia disable comments or use alternative

I'm making a small personal django website for a beginning architect and should, among others, contain blogging functionality. I have been wondering for a while whether I should use an existing blogging app or write my own. Of course there are many…
PieterV
  • 720
  • 6
  • 21
7
votes
5 answers

How to format form fields for django comments?

I am using a form which is generated for me by django. I'm using this as a comment form after a post in my blog. Currently it renders fine but it's not nicely aligned. This is what I have. This is what I'd like. Thanks edit: This is the result…
darren
  • 17,033
  • 16
  • 55
  • 79
7
votes
4 answers

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…
rk919
  • 297
  • 2
  • 5
  • 13
6
votes
2 answers

Use django-contrib-comments (the app) in new Django projects?

From the documentation: "Django’s comment framework has been deprecated and is no longer supported. Most users will be better served with a custom solution, or a hosted product like Disqus. The code formerly known as django.contrib.comments is still…
allcaps
  • 9,782
  • 1
  • 28
  • 49
6
votes
1 answer

Writing nested comments in Django/Python

Django provides an excellent comments app. However, I don't want to use the other fields like user_email, user_url etc. I want to develop a nested comment system (just like Quora does, unlike Facebook). But I can't understand how to go forward the…
xan
  • 4,805
  • 11
  • 42
  • 76
5
votes
1 answer

Returning Django comments for a Tastypie resource

My Django site has a Photo model which represents photos in the system and I'm using Django.contrib.comments to allow users to comment on these. This is all working fine but I'd like to extend my Tastypie API to allow accessing of comments for my…
Roarster
  • 684
  • 1
  • 7
  • 13
4
votes
1 answer

How do I customize Django's comments form?

I am trying to customize Django's comments form. Inside django.contrib.comments.forms I noticed that all the field forms are declared in the class CommentDetailForm, which is inherited from CommentSecurityForm. Then I think when I write the template…
hobbes3
  • 22,472
  • 23
  • 78
  • 114
4
votes
1 answer

Django comments taking out new lines

So I've been working with Django-comments and I'm pretty happy, but a friend pointed out that when he posted something that was longer and had new lines, Django took them out. For example if I posted: line1 line2 line3 Then it would be saved and…
Luke
  • 1,893
  • 1
  • 16
  • 25
4
votes
2 answers

Django comments

I have a Django application with two models: the first one is django.contrib.auth.User and the second one is Product, created by me. For every product I would add the comments, so every User registered can insert a comment for every product. I've…
Fred Collins
  • 4,664
  • 14
  • 58
  • 108
4
votes
4 answers

Django: Redirect after posting a comment

I am trying to redirect the user back to the page where the comment was posted. I found this post on Django's site but I am doing something wrong because it won't redirect back. Where should the input be placed to have it properly redirected? {%…
Emile
  • 3,246
  • 8
  • 37
  • 73
4
votes
1 answer

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…
Guy Bowden
  • 4,597
  • 3
  • 31
  • 48
1
2 3
12 13