NoReverseMatch Error still

6 views
Skip to first unread message

hoangelos

unread,
Feb 1, 2009, 5:27:28 PM2/1/09
to Django Basic Apps
I've both googled and check through the google groups and added the
comments in the urls.py of my project, but still no dice. Can anyone
help. I can go to the /blog/ url, but the URL of each blog item is
not correct obviously.

http://pastebin.com/m632659dd

sketch22

unread,
Feb 1, 2009, 5:49:33 PM2/1/09
to Django Basic Apps
The blog_archive_day named url pattern requires three arguments: year,
month, and day. Here is an example of how you'd use it in the
templates:

{% url blog_archive_day year="2009", month="feb", day="1" %}

If you're using it with the reverse method in a view you'd do:

reverse('blog_archive_day', kwargs={'year': '2009', 'month': 'feb',
'day': '1'})

sketch22

unread,
Feb 1, 2009, 5:50:39 PM2/1/09
to Django Basic Apps
You'll find more on named URL patterns here:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url

hoangelos

unread,
Feb 1, 2009, 5:58:20 PM2/1/09
to Django Basic Apps
The only difference in your and mine is with mine the year and day are
integers while yours are strings. Also the template that Im using is
the one right from Svn. I'm using 1.0.3 of django.

hoangelos

unread,
Feb 1, 2009, 9:15:58 PM2/1/09
to Django Basic Apps
I am using the latest version from svn of the basic.blog. When I add
it into a project with the link from above I can add blog post. They
display when I view the posting list page, but the URL is wrong. I
would like to use the app, but can't seem to figure out why it's not
working. If someone needs to see any other part of the codeset let me
know.

hoangelos

unread,
Feb 1, 2009, 9:31:28 PM2/1/09
to Django Basic Apps
Found it. in urls.py it was the (.*) after the url pattern for the
blog that was killing it.

sketch22

unread,
Feb 1, 2009, 9:46:25 PM2/1/09
to Django Basic Apps
Yeah, I was going to say something about that :)
Reply all
Reply to author
Forward
0 new messages