Valchris
Valchris

Reputation: 1481

Django Comments error following tutorial

I'm trying to integrate Django's comment app into my site but with no success. I've been following the documentation outlined at: Django comments

The error I'm getting is:

Caught ViewDoesNotExist while rendering: Tried search in module FrontEnd.views. Error was: 'module' object has no attribute 'search'

nothing in my views refers to anything involving search. Something in the comments install is causing this. The line that actually fails is.

<form action="{% comment_form_target %}" method="post">

comment_form_target is highlighted.

The code causing the error:

{% load comments %}
{% get_comment_form for article as form %}
<form action="{% comment_form_target %}" method="post">
    {{ form }}
</form>

From what I've found online, it looks like i'm either missing some library in my Python 2.7 or i'm doing circular imports?

Upvotes: 0

Views: 383

Answers (1)

Bryce Siedschlaw
Bryce Siedschlaw

Reputation: 4226

Add a search view in FrontEnd.views.py and see what the problem is.

I'm adding an answer so we can nicely close this ticket.

An error of the form

Tried test in module appname.views. Error was: 'module' object has no attribute 'search'

is generated when django tries to do reverse url lookups and the urls.py file contains a broken view.

Upvotes: 1

Related Questions