6
I had the same exact problem, render_comment_form template tag was triggering it.
The issue is certainly with your URL config, you had it set the same way i did:
(r'^comments/$', include('django.contrib.comments.urls'))
The correct way is to remove the β$β after βcomments/β:
(r'^comments/', include('django.contrib.comments.urls'))
Otherwise django canβt properly include all necessary urls under the path comments/β¦
Hope this helps.
1
The error message is indicated that it canβt find a reverse url for:
django.contrib.comments.views.comments.post_comment
So basically something isnβt configured right in your urls. Without being able to see more of how things are setup itβs difficult to know exactly what.
Maybe try re-ordering the urls pattern includes in your urls.py, to force the django comments urls to the top?
- [Django]-How do I append a list to FormData?
- [Django]-Django rest_framework 3.22 multiple updates creating objects instead of updating
- [Django]-Django Rest Framework doesn't accept ArrayField POST
- [Django]-Django replaces non-ascii characters with \ufffd
- [Django]-Caught DoesNotExist while rendering: Photo matching query does not exist
1
I had this same problem today. I was referencing a view in urls.py that I hadnβt created yet.
From http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse
As part of working out which URL names
map to which patterns, the reverse()
function has to import all of your
URLconf files and examine the name of
each view. This involves importing
each view function. If there are any
errors whilst importing any of your
view functions, it will cause
reverse() to raise an error, even if
that view function is not the one you
are trying to reverse.Make sure that any views you reference
in your URLconf files exist and can be
imported correctly. Do not include
lines that reference views you havenβt
written yet, because those views will
not be importable.
- [Django]-'ascii' codec can't decode byte 0xe2 in position 5367: ordinal not in range(128)
- [Django]-Django & Nginx deeplinking domains (re-write rules or django urls?)
1
This error is saying that it found the view django.contrib.comments.views.comments.post_comment
but no args () or kwargs{} were passed.
Its not passing a value for object.id into the url.
Take out the url tag and see if the id of the <div id="post_{{object.id}}">
reflects a proper object.id