Hello.  I think I'm up against a bug in the new comments app.  I could
be wrong.

I just deleted my old install and installed 1.0 this morning.  I don't
know if that has anything to do with it or not.

I looked at this thread:
http://groups.google.com/group/django-users/browse_thread/thread/2012bd8d6c9f37e0/11f7945a22bd5e35?lnk=st&q=django++comments+problem#11f7945a22bd5e35

I couldn't find any .pyc files in my comments directory or
subdirectories, so I had nothing to delete.
I dropped and rebuilt the database, too.  No changes in the error
message.

Any thoughts?


Here's my template:

{% extends "base.html" %}
{% load comments %}

{% block content %}
<span style="font-size: 1.5em"}>
        <a href="{{Article.url}}">{{Article.title}}</a>
</span><br>

{% get_comment_list for Article as comment_list %}
{% for comment in comment_list %}
        <ul> {{comment}} <br> hi
{% endfor %}

{% render_comment_form for Article %}

{% endblock content %}

The error message I'm getting:

Caught an exception while rendering: Reverse for '<function
post_comment at 0x0152F9F0>' with arguments '()' and keyword arguments
'{}' not found.

Environment:

Request Method: GET
Request URL: http://localhost:8000/news/detail/cute-dog/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.0
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.comments',
 'social_news']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Template error:
In template c:\python25\lib\site-packages\django\contrib\comments
\templates\comments\form.html, error at line 2
   Caught an exception while rendering: Reverse for '<function
post_comment at 0x0152F9F0>' with arguments '()' and keyword arguments
'{}' not found.
   1 : {% load comments %}
   2 : <form action=" {% comment_form_target %} " method="POST">
   3 :   {% for field in form %}
   4 :     {% if field.is_hidden %}
   5 :       {{ field }}
   6 :     {% else %}
   7 :       <p
   8 :         {% if field.errors %} class="error"{% endif %}
   9 :         {% ifequal field.name "honeypot" %}
style="display:none;"{% endifequal %}>
   10 :         {% if field.errors %}{{ field.errors }}{% endif %}
   11 :         {{ field.label_tag }} {{ field }}
   12 :       </p>

Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "C:\Python25\Lib\site-packages\django\views\generic
\list_detail.py" in object_detail
  143.     response = HttpResponse(t.render(c), mimetype=mimetype)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  176.         return self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  768.                 bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
  71.             result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
render
  97.         return compiled_parent.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  176.         return self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  768.                 bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
  71.             result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
render
  24.         result = self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  768.                 bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
  71.             result = node.render(context)
File "C:\Python25\Lib\site-packages\django\contrib\comments
\templatetags\comments.py" in render
  159.             formstr = render_to_string(template_search_list,
{"form" : self.get_form(context)}, context)
File "C:\Python25\Lib\site-packages\django\template\loader.py" in
render_to_string
  107.     return t.render(context_instance)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  176.         return self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
  768.                 bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
  81.             raise wrapped

Exception Type: TemplateSyntaxError at /news/detail/cute-dog/
Exception Value: Caught an exception while rendering: Reverse for
'<function post_comment at 0x0152F9F0>' with arguments '()' and
keyword arguments '{}' not found.

Original Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\django\template\debug.py", line
71, in render_node
    result = node.render(context)
  File "C:\Python25\Lib\site-packages\django\template\__init__.py",
line 888, in render
    return func(*resolved_vars)
  File "C:\Python25\Lib\site-packages\django\contrib\comments
\templatetags\comments.py", line 246, in comment_form_target
    return comments.get_form_target()
  File "C:\Python25\Lib\site-packages\django\contrib\comments
\__init__.py", line 50, in get_form_target
    return
urlresolvers.reverse("django.contrib.comments.views.comments.post_comment")
  File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py",
line 252, in reverse
    *args, **kwargs)))
  File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py",
line 241, in reverse
    "arguments '%s' not found." % (lookup_view, args, kwargs))
NoReverseMatch: Reverse for '<function post_comment at 0x0152F9F0>'
with arguments '()' and keyword arguments '{}' not found.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to