I have made a blog with Django with articles (like so: mysite.com/a/article\_id/) and would like users to be able to comment on the **article's comment page** (i.e: mysite.com/a/article\_id/comments/)

So far I haven't had much success. It seems that the **article\_id** in the url is blocking somehow the comments app.

This is my *url.py*:

```
from django.conf.urls import patterns, include, url
from django.contrib.auth.views import login, logout

urlpatterns = patterns('blogengine.views',
    url(r'^$', 'get_posts', name='index'),
    url(r'^write/', 'write_post', name='write'),
    url(r'^a/(?P<post_id>\d+)/$', 'detail'),
    url(r'^a/(?P<post_id>\d+)/comments/$', 'detail_comments'),
    url(r'^a/(?P<post_id>\d+)/comments/', include('django.contrib.comments.urls')),
)

```

These are my views - *views.py*:

```
def detail_comments(request, post_id):
    p = get_object_or_404(Post, pk=post_id)
    return render_to_response('blogengine/detail_comments.html', {'post': p},
    context_instance=RequestContext(request))

```

And this is my template detail\_comments.html

```
{% block content %}
{% load comments %}
{% get_comment_form for post as form %}

<form action="/a/{{ post.id }}/comments/post/" method="post">
    {% csrf_token %}
{{ form.content_type }}
{{ form.object_pk }}
{{ form.timestamp }}
{{ form.security_hash }}
<p style="display:none"><label for="id_honeypot">Leave blank</label>{{ form.honeypot }}</p>
<p>
    <label for="id_comment">Comment</label>
    {{ form.comment }}
</p>
<p><input type="submit" name="post" value="Post &rarr;" /></p>
</form>
{% endblock %}

```

(Oh and this is kind of obvious but the comments app is installed in settings.py)

If the form action is set to **{% comment\_form\_target %}**, like suggested in the docs, django throws this error:

```
NoReverseMatch at /a/2/comments/
Reverse for 'django.contrib.comments.views.comments.post_comment' with arguments '()' and keyword arguments '{}' not found.

```

I tried "hacking" my way out by replacing it with this **/a/{{ post.id }}/comments/post/** which works to display the page but then if I try to post a comment, django throws a different error:

```
TypeError at /a/2/comments/post/
post_comment() got an unexpected keyword argument 'post_id'

```

Is there a way to get the comments app to ignore the id\_post? Or another way to do this?

Thanks.