204 questions
-1
votes
1
answer
53
views
python package `drf-comments` not being recognized
i am developing a rest-based django project. i want to implement a commenting system in my project; but it has to be decoupled from the other apps. therefore, deepseek suggested to use drf-comments in ...
0
votes
0
answers
59
views
Cannot display a comment on a blog page - django
I have been trying to create a comment section for a blog site. Comments should only be made by the site's users. I am able to make comments and display them in the comment section from the admin ...
0
votes
2
answers
102
views
django-comments-xtd clashing with wagtail-localize
I am following the official tutorial for wagtail-localize, and I am at the step to set up a second locale. When I hit save, I get:
DoesNotExist at /admin/locales/new/
XtdComment matching query does ...
1
vote
1
answer
58
views
Django: cant relate my comment to a specific product
I dont know how to link comments to specific product(object). Maybe there is something to do with slugs.
P.S. All the comments can be successfully uploaded to the database, but the problem is only ...
0
votes
2
answers
504
views
How to write a comment and reply with django with this model?
I'm a newcomer and I have this problem that I can't send this comment to database it just refreshes the page and nothing happens.
def blog_detail(request , id):
post = Post.objects.get(pk = id , ...
0
votes
1
answer
132
views
Duplicate Media(CSS, JS) load when using class inheritance in django components
I am using django-components. Common parts are inherited from parent classes and child classes are registered as components. It is written as follows
components.py
from django_components import ...
-1
votes
1
answer
48
views
How To Solve Django ValueError: :Comment.post" must be a "Software" instance
I'm getting an error over and over again when I'm displaying comments for a program. Please what is the problem I made here? I made many attempts using get , filter but the error remains the same. ...
0
votes
1
answer
190
views
Django Comments Xtd Comments are not nesting
I followed the tutorial on https://django-comments-xtd.readthedocs.io, everything seems to work find, the forms and the comments are working, but on the website they are not displayed properly.
...
1
vote
1
answer
345
views
AttributeError: 'Doctor' object has no attribute 'comments'
I'm working on this project but I got the following error
comm = doctor_detail.comments.filter(active=True)
AttributeError: 'Doctor' object has no attribute 'comments' however I think that everything ...
0
votes
0
answers
48
views
Django wont display my comments on template
I've tried to implement the comments within the html page after creating them in my models and I have migrated them but they still wont appear within the page although when I add a comment from the ...
0
votes
1
answer
44
views
`django_comments_xtd` shared by multiple class models
I have a Django+Wagtail blog site integrated with django_comments_xtd as below:
class PostDetail(Page):
...
class Comment(XtdComment):
page = models.ForeignKey('PostDetail', on_delete=models....
0
votes
1
answer
57
views
save() method for django_comments_xtd model
I am using Wagtail + Django_comments_xtd + Django.
My_Django_App/models.py
from wagtail.core.models import Page
class PostPage(Page):
...
from django_comments_xtd.models import XtdComment
class ...
2
votes
1
answer
60
views
what is key difference between posting a new comment and replying to existing comments?
I want to find out the key differences when assembling comment form between posting a new comment and replying to existing comments and how are they implemented in source code of django_comments_xtd?
...
0
votes
1
answer
66
views
How is BaseCommentNode.render() in django_comments triggerred exactly?
According to Django official doc, it reads,
The template system works in a two-step process: compiling (parsing template texts to Nodes) and rendering (render Nodes to HTML file).
Let us take django-...
0
votes
1
answer
46
views
CommentForm design question about Django-comments package
In Django's own comment framework, django-contrib-comments, it has below class defined:
In models.py, class Comment (CommentAbstractModel): is defined.
In forms.py, class CommentForm (...
0
votes
1
answer
527
views
How to style forms produced by django_comments_framework using tailwindcss
I was trying to use tailwindcss plugins tailwindcss-forms to style comment forms produced by django comments framework.
tailwindcs-forms requires tailwind styling class to be applied on <input type=...
0
votes
1
answer
138
views
how to add comments only to authorized users?
Added the ability to add comments, made it so that only authorized users can add comments, but for some reason this does not work, please fix it.
I also added tag strong, but for some reason it does ...
1
vote
0
answers
35
views
The comment form is displayed incorrectly
I am making comments on django on this video
https://www.youtube.com/watch?v=bmFkND-scpY
when the author in the middle of the video showed what he had done, he showed this (this is how it should be)
...
0
votes
1
answer
122
views
Comments in the admin panel are added, but they are not visible on the site
Based on this tutorial https://www.youtube.com/watch?v=An4hW4TjKhE&ab_channel=AbhishekVerma
I'm trying to add the ability to add comments under posts, add a comment in the admin panel, everything ...
0
votes
2
answers
1k
views
ModuleNotFoundError: No module named 'commentdjango'
I am trying to add comments to posts on my blog on this guide
https://pypi.org/project/django-comments-dab/ but when doing migrations I get this error, thanks for any help
0
votes
1
answer
463
views
how to create comment tree in django
I need a comment system so can reply a comment to any comment
I know how to write models and views and my only problem is showing them in the template
For example, maybe a group of comments are like ...
2
votes
1
answer
531
views
Why are comment permalinks for django-comments-xtd going to example.com in Wagtail?
I'm setting up comments in Wagtail using django-comments-xtd and one thing I'm having trouble figuring out is why my comment permalinks keep going to https://example.com/news/bloggy-test-post/#c1 ...
0
votes
1
answer
122
views
Import error while customizing django-comments-xtd
acordign to the documentation for django-XtdComments in order to have my custom comment model instead of XtdComment the setting file should be like this:
COMMENTS_APP = "django_comments_xtd"
...
0
votes
0
answers
29
views
How can I show the details of a post along with its comments using Django framework?
new to the Django framework and a little rusty with coding. I am currently trying to build a tech blog from the ground up and have been using Django Central tutorials as a guide. Currently, I am stuck ...
0
votes
1
answer
99
views
delete comments with the user
I am using the comment library. It is built on top of django-contrib-comments
The question is, how can you make sure that when you delete a user, all comments associated with him would be deleted? I ...
0
votes
1
answer
48
views
My comments are not being displayed in a django blog
I am trying to add a comment section to add a comment section to my blog detail using django but when i run my server i get no error in the development server and the comments are not being displayed. ...
0
votes
1
answer
738
views
FOREIGN KEY constraint failed, why am I getting this error?
I'm creating a blog and right now I'm working in the comments section, I'm working in the edit comments, everything works right, but the problem is the following, whenever I update the view I want to ...
0
votes
1
answer
118
views
Wrong: /admin/login/, Expected: /accounts/login/
Django==3.0.8
django-comments-xtd==2.6.2
views.py
@csrf_protect
@login_required
def like(request, comment_id, next=None):
"""
Like a comment. Confirmation on GET, action on POST....
0
votes
1
answer
38
views
Can't see removal flags
Django 3.0.8
django-comments-xtd==2.6.2
I'm studyint this section of the tutorial:
https://django-comments-xtd.readthedocs.io/en/latest/tutorial.html#removal-suggestion
post_detail.html
{% extends &...
0
votes
1
answer
83
views
Django Comments Newbie
I started learning Django about a month ago and just finished Django for Beginners by William Vincent. The book ends with Ch.15: Comments and shows how the admin can add comments to posts.
Q: Can ...
0
votes
1
answer
173
views
Django Comment Function creates HTTP 405 Error
I tried to create a commenting function for my Django blog application and comments as such work fine but I can only add them through my admin page. However, I would like users to be able to add ...
1
vote
1
answer
1k
views
Django load more comments with AJAX [duplicate]
In the profile page, I want to display posts of a user. Each post might have several comments, I don't want to display all the comments to the post instead I want to display only few comments and add ...
0
votes
1
answer
195
views
Converting Django project from Python 2 to Python 3: pip3 install django_comments NameError unicode
System info: 64-bit OS-X, Python 3.7
I am converting a Django website from Python 2 to Python 3. To do this, I ran 2to3 on the whole project. I then installed all of the required modules in ...
0
votes
1
answer
1k
views
putting commenting form on the same page as the post in django
I need help putting the commenting form for users on the same page as the post, currently i have the commenting form on another page but i'd really like the users to be able to post comments as soon ...
0
votes
0
answers
142
views
My comment reply function is not working?
I am making a blog but I am stuck on a comment replies function. I don't know how to make a Reply function from which users can reply to the comments. I tried a lot but it's still displaying those ...
1
vote
0
answers
62
views
NoReverseMatch at /post/
I want to create a comment part. I did but there is an error in my detail page. The error is
*NoReverseMatch at /post/123/
Reverse for 'blog_comment' with arguments '('',)' not found. 1 pattern(s) ...
0
votes
1
answer
659
views
comment form doesn't load when using django-comments-xtd
I am new to both Django and Python and am trying to create my blog.My setup consists of Django 2.0.7 and Python 3.6.5 running on windows 10.I have configured only one app named "personal".In my case ...
-1
votes
1
answer
281
views
django-comments add a new url and a view for comments?
i am newer and study django.when i install django_comments , i need add to add a new url and view for django_comments, but it don't work.
comments folder structure:
__init__.py __pycache__/ forms....
1
vote
1
answer
261
views
Django comments custom user profile avatar
I'm using Ajax Comments System to render comments and the form
and I have a custom user profile that include avatar field
class UserProfile(models.Model):
user = models.OneToOneField(User, ...
1
vote
3
answers
675
views
how can i display comments below the respective post in the home page
i want to implement something like fb does like displaying all the respective comments below their respective posts in home page
model.py
from django.db import models
from django.contrib.auth.models ...
3
votes
2
answers
1k
views
'str' object has no attribute '_meta' error when setting up django-comments-xtd per documentation
My site is actually a wagtail site, although I'm not sure if that makes a difference. It's a simple blog application with a blog page to view posts and a page to show each post.
I was following the ...
2
votes
3
answers
678
views
django-comments-xtd not accessible with wagtail? How to troubleshoot?
I have installed django-comments-xtd following the quick start guide in the documentation here.
When I go to access the /comments URL, I only get a 404 error, and the message 'Raised by: wagtail....
1
vote
0
answers
1k
views
Attribute error '/posts/' 'Comment' object has no attribute '_mptt_meta'
I am following this example on how to set threaded comments with django_comments and django-mptt.
I have followed most of it and the posted comments are working in admin but I am getting this error '...
1
vote
1
answer
206
views
django-fluent-comments model doesn't appear in Wagtail ModelAdmin
I have a Wagtail project that uses django-fluent-comments and I would like to be able moderate the comments in the admin pages. Based on this tutorial I added this to my wagtail_hooks.py file:
class ...
1
vote
1
answer
288
views
Django-Fluent-Comments - NoReverseMatch at /rohit/post/new/
i tried every thing but i donot know how to remove this error.
need help guys.
i am using django-fluent-comments for comments and when i put this line
{% render_comment_form for object %}
to get ...
0
votes
1
answer
66
views
Associate comments with an already authorized user?
My task is to create comment system in django project. I am tring to use django-comments-xtd app.
I successfully added this app to my project and use {% render_comment_form for object %} in template. ...
0
votes
1
answer
1k
views
django-threadedcomments: 'RequestContext' object has no attribute 'META'
I try to use django-threadedcomments
But when I add into template
{% load threadedcomments_tags %}
I get error on this lines
{% render_comment_list for publication %}
{% render_comment_form for ...
0
votes
1
answer
247
views
django_comments adding new field in the model
I am trying to add a new field in django_comment model. According to the documentation, most custom comment models will subclass the CommentAbstractModel model:
from django.db import models
from ...
0
votes
1
answer
384
views
Why I can't get django_comments in the admin
The version of django is 1.10 and Python version is 2.7.6 .After I have migrate and create table,it showed that I have migrated the django_comments.When I get into my admin,I can't find the ...
1
vote
1
answer
115
views
Django_comments: What's the proper way to override post_comment()?
I'm trying to customize django_comments app (github repo, docs).
The default get_form_target() returns django_comments.views.post_comment, which is a function-based view. post_comment(), in turn, ...