here is my line of code
url(r'^comment/allcomments/(?P<commentName>[-\w]+)/all/$', 'comment.views.allUserComments'),
def allUserComments(request, commentName):
userComments = Post.objects.get(name=commentName)
return render_to_response('/comment/comments.html', { 'Post': userComments })
what i want it to do is similar to the Poll tutorial on https://www.djangoproject.com/, but I can't seem to get it to work. I keep getting the following after clicking on the user "name"
Using the URLconf defined in Sampleblog.urls
, Django tried these URL patterns, in this order:
- ^$ [name='home']
- ^comment/allcomments/(?P<commentName>[-\w]+)/all/$
- ^comment/comments.html$ [name='comment']
- ^static/(?P<path>.*)$
- ^admin/doc/
- ^admin/
The current URL, comment/mando/all/
, didn't match any of these.
the comment page shows this with a link for the "name"
Last 5 Comments....
mando - said on Sept. 1, 2012, 5:18 p.m....
Testing 2
mando - said on Sept. 1, 2012, 5:18 p.m....
Testing 2
mando - said on Sept. 1, 2012, 5:17 p.m....
Testing 12
mando - said on Sept. 1, 2012, 5:17 p.m....
1
is there something i'm missing here? Any suggestions are greatly appreciated
Thanks
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/D-skLJUDiP4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment