Re: Error in blog

81 views
Skip to first unread message

kenneth gonsalves

unread,
Jul 12, 2012, 7:40:46 AM7/12/12
to django...@googlegroups.com
On Wed, 2012-07-11 at 23:29 -0700, jun wrote:
> 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?

what version of django are you using - is it the same version that is
being used in the example?
--
regards
Kenneth Gonsalves

jun

unread,
Jul 12, 2012, 9:56:56 AM7/12/12
to django...@googlegroups.com
Hi I'm using Django 1.4 now. Understand that the example is using 1.2. Would this have an effect?

Regards,
jun

luthur

unread,
Jul 12, 2012, 10:06:16 AM7/12/12
to django...@googlegroups.com
why not post your example? It's too abstract.

-- 
luthur
--
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/-/Ox4KIBiwce8J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Tomas Neme

unread,
Jul 12, 2012, 11:30:58 AM7/12/12
to django...@googlegroups.com
Have you done the django tutorial, first? it covers named urls
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde

|_|0|_|
|_|_|0|
|0|0|0|

(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.

luthur

unread,
Jul 12, 2012, 11:35:57 AM7/12/12
to django...@googlegroups.com

-- 
luthur

jun

unread,
Jul 12, 2012, 7:13:31 PM7/12/12
to django...@googlegroups.com
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)
Reply all
Reply to author
Forward
0 new messages