Django nested URLs

I think is probably because you're finishing the regex with the dollar sign $. Try this line without the dollar sign:

...
url(r'^(?P<pk>[0-9]+)/comments/', include('comment.urls')),
...

Hope it helps!


You have a $ at the end of r'^(?P<pk>[0-9]+)/comments/$'.

That means Django will only match with that URL when there is nothing after that.

So any longer URLs currently won't be considered. Therefore, you need to update the regular expression to:

url(r'^(?P<pk>[0-9]+)/comments/', include('comment.urls')),