Re: Error in blog
Sorry if the question wasn't clear enough, and yes, I did read up on urlpatterns on djangoproject but did not understand everything yet :(
I followed the code here http://lightbird.net/dbe/blog.html up to the section 'Front Page View' and is supposed to obtain a display like this http://lightbird.net/dbe/_static/b2.png. This is the point where the error 'Reverse for 'blog_post_add' with arguments '()' and keyword arguments '{}' not found.' occurred. The blog_post_add originates from templates/blog/bbase.html:
<a href="{% url admin:blog_post_add %}">Add post</a>
Also, I'm a bit confused by this code in the same section.
...and a line in urls.py:
urlpatterns = patterns('dbe.blog.views',
(r"", "main"),
)
What does r"" mean? I placed this line in blog/urls.py instead of the root_urlconf dbe/urls.py. Is this correct?
Thanks!
On Thursday, July 12, 2012 2:29:01 PM UTC+8, jun wrote:
Hi,--
I was trying out the blog example in Django by Example but ran into this error:Reverse for 'blog_post_add' with arguments '()' and keyword arguments '{}' not found.
I think it has something to do with the urlpatterns since there is no /blog/post/add configuration there, and tried a few variations but nothing worked.
What should I do next? Any django docs I can refer to, as in how to link the blog_post_add with the main url?
Thanks,
jun (django noob)
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/-/ckkmKRAPanIJ.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home