Also see
http://groups.google.com/group/django-users/browse_thread/thread/1f4bb991f9f0f7b5/62005ad4330c4884?lnk=gst&q=noReverseMatch#62005ad4330c4884

Short summary: maybe your named url regexes aren't matching the
variables passed to them in the {% url ... %} tag.

Apply the patch from http://code.djangoproject.com/ticket/8221 and
you'll know for certain if that's it.

Zapping old .pyc files can't hurt too!

Cheers,
Tone

On Aug 29, 4:29 am, hotani <[EMAIL PROTECTED]> wrote:
> Did you delete the .pyc files from the django source? Another approach
> would be to go into /django/contrib/ and delete the comments
> directory, then do an 'svn up' to restore it. Then you'll be sure to
> get a fresh copy.
>
> That is what worked for me. But if you haven't used the comment system
> before then there shouldn't even be any pyc files in there, so I don't
> know what is going on.
>
> On Aug 28, 2:57 am, Mark <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > Updated to 8613 with the release of Django 1.0 Beta 2 and saw the
> > addition of commenting framework - tried to add it and am getting a
> > similar error to above.
>
> > On Aug 27, 3:54 pm, Slavus <[EMAIL PROTECTED]> wrote:
>
> > > Here is the solution:
> > > You'll get this if you still have stale pyc files left over from the
> > > old comment system. Delete 'em and your code will work.
>
> > I tried this (even though I did not use the old commenting system).
>
> > Here is the exception information...
> > --------------------------------------------------------------------------- 
> > -------------------------
> > Environment:
>
> > Request Method: GET
> > Request URL:http://localhost/apps/buildboard/builddetails/80/
> > Django Version: 1.0-beta_1-SVN-unknown
> > Python Version: 2.5.1
> > Installed Applications:
> > ['django.contrib.auth',
> >  'django.contrib.contenttypes',
> >  'django.contrib.sessions',
> >  'django.contrib.sites',
> >  'django.contrib.admin',
> >  'django_apps.buildboard',
> >  'django_xmlrpc',
> >  'django.contrib.comments']
> > Installed Middleware:
> > ('django.middleware.common.CommonMiddleware',
> >  'django.contrib.sessions.middleware.SessionMiddleware',
> >  'django.contrib.auth.middleware.AuthenticationMiddleware',
> >  'django.middleware.doc.XViewMiddleware')
>
> > Template error:
> > In template c:\_tools\python251\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 0x0158BEF0>' 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:\_tools\python251\lib\site-packages\django\core\handlers
> > \base.py" in get_response
> >   86.                 response = callback(request, *callback_args,
> > **callback_kwargs)
> > File "c:\_tools\python251\lib\site-packages\django\contrib\auth
> > \decorators.py" in __call__
> >   67.             return self.view_func(request, *args, **kwargs)
> > File "c:\_projects\django_apps\..\django_apps\buildboard\views.py" in
> > build_details
> >   309.     print t.render(c)
> > File "c:\_tools\python251\lib\site-packages\django\template
> > \__init__.py" in render
> >   176.         return self.nodelist.render(context)
> > File "c:\_tools\python251\lib\site-packages\django\template
> > \__init__.py" in render
> >   756.                 bits.append(self.render_node(node, context))
> > File "c:\_tools\python251\lib\site-packages\django\template\debug.py"
> > in render_node
> >   71.             result = node.render(context)
> > File "c:\_tools\python251\lib\site-packages\django\contrib\comments
> > \templatetags\comments.py" in render
> >   158.             formstr = render_to_string(template_search_list,
> > {"form" : self.get_form(context)}, context)
> > File "c:\_tools\python251\lib\site-packages\django\template\loader.py"
> > in render_to_string
> >   107.     return t.render(context_instance)
> > File "c:\_tools\python251\lib\site-packages\django\template
> > \__init__.py" in render
> >   176.         return self.nodelist.render(context)
> > File "c:\_tools\python251\lib\site-packages\django\template
> > \__init__.py" in render
> >   756.                 bits.append(self.render_node(node, context))
> > File "c:\_tools\python251\lib\site-packages\django\template\debug.py"
> > in render_node
> >   81.             raise wrapped
>
> > Exception Type: TemplateSyntaxError at /apps/buildboard/builddetails/
> > 80/
> > Exception Value: Caught an exception while rendering: Reverse for
> > '<function post_comment at 0x0158BEF0>' not found.
>
> > Original Traceback (most recent call last):
> >   File "c:\_tools\python251\lib\site-packages\django\template
> > \debug.py", line 71, in render_node
> >     result = node.render(context)
> >   File "c:\_tools\python251\lib\site-packages\django\template
> > \__init__.py", line 876, in render
> >     return func(*resolved_vars)
> >   File "c:\_tools\python251\lib\site-packages\django\contrib\comments
> > \templatetags\comments.py", line 245, in comment_form_target
> >     return comments.get_form_target()
> >   File "c:\_tools\python251\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:\_tools\python251\lib\site-packages\django\core
> > \urlresolvers.py", line 307, in reverse
> >     *args, **kwargs)))
> >   File "c:\_tools\python251\lib\site-packages\django\core
> > \urlresolvers.py", line 291, in reverse
> >     raise NoReverseMatch("Reverse for '%s' not found." % lookup_view)
> > NoReverseMatch: Reverse for '<function post_comment at 0x0158BEF0>'
> > not found.
>
> > --------------------------------------------------------------------------- 
> > -------------------------
>
> > The code that is causing this... (in a view method for debug
> > purposes...)
> >     from django.template import Template, Context
> >     t=Template('{% load comments %}{% render_comment_form for
> > buildboard.build 1 %}') # also tried using model instance, with
> > appropriate context entry.
> >     c=Context({})
> >     print t.render(c)
>
> > Do you need more information from me?
>
> > Thanks
> >   Mark
--~--~---------~--~----~------------~-------~--~----~
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