[Answered ]-Django-Fluent-Comments – NoReverseMatch at /rohit/post/new/

2πŸ‘

βœ…

The error occurs as a result of the url you have specified. Any named url in the fluent_comments.urls you have included in your ^(?P<username>\w+)/post/(?P<slug>[\w-]+)/comments/ will need to be passed a username and slug objects.

When django-fluent-comments try to render
{% render_comment_form for object %} it will use a reverse url tag, but it wasn’t passed a username or slug objects.

Instead, you can either do what the django-fluent-comments authors have suggested and add the following to your url.py

urlpatterns += patterns('',
    url(r'^blog/comments/', include('fluent_comments.urls')),
)

or remove the username and slug objects.

If you really want to add them, than you can override the templates in django-fluent-comments such that every url tag that uses a url name is passed a username and slug objects.

Check out the Django Urls section for more information.

πŸ‘€Algorithmatic

Leave a comment