django / django-contrib-comments

BSD 3-Clause "New" or "Revised" License
619 stars 197 forks source link

'comments-post-comment' is not a valid view function or pattern name. #143

Closed HelloGit100 closed 5 years ago

HelloGit100 commented 5 years ago

` {% get_comment_list for article as comment_list %} {% for comment in comment_list %}

{% endfor %} `

{% render_comment_form for article %}

The following error has occurred: NoReverseMatch at /article/1/ Reverse for 'comments-post-comment' not found. 'comments-post-comment' is not a valid view function or pattern name. Request Method: GET Request URL: http://127.0.0.1/article/1/ Django Version: 2.2 Exception Type: NoReverseMatch Exception Value: Reverse for 'comments-post-comment' not found. 'comments-post-comment' is not a valid view function or pattern name. Exception Location: /home/venv/lib/python3.7/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 660 Python Executable: /home/venv/bin/python3 Python Version: 3.7.3

Do I need to add something to the application's forms.py?

claudep commented 5 years ago

Looks like django_comments urls are not properly included in your project. However, this issue tracker is not meant as a support channel but only to report bugs or proposal for the package.

demonhunter3333 commented 4 years ago

I'm having the same issue, after following the exact steps of the tutorial.

shaib commented 4 years ago

Look at https://github.com/django/django-contrib-comments/blob/master/django_comments/urls.py That is the file that defines the 'comments-post-comment' url name. This file is supposed to be included in your project's urls definition by step 5 of the tutorial.

If you are convinced that there is a problem with either the library or its documentation, please supply your settings and your project's main urls.py.

demonhunter3333 commented 4 years ago

Look at https://github.com/django/django-contrib-comments/blob/master/django_comments/urls.py That is the file that defines the 'comments-post-comment' url name. This file is supposed to be included in your project's urls definition by step 5 of the tutorial.

If you are convinced that there is a problem with either the library or its documentation, please supply your settings and your project's main urls.py.

Hi shaib,

Thanks for your kind reply!

I apologize for leaving a thoughtless comment like this. It was a mistake at my end and I have resolved it.