Noob here so I may be way wrong but it looks to me like your problem is
probably in link in category page when generating the link to add_page,
given the url in the error is missing the category name in the URL. Have
you passed category_name_url from your view function to the category
template? Your views.py link seems to show forms.py rather than the view
functions so I cant see the view, but my category view looks as follows and
works:
def category(request, category_name_url):
context = RequestContext(request)
category_name = decode_url(category_name_url)
context_dict = {'category_name': category_name, 'category_name_url':
category_name_url}
try:
category = Category.objects.get(name=category_name)
pages = Page.objects.filter(category=category)
context_dict['pages'] = pages
context_dict['category'] = category
except Category.DoesNotExist:
pass
return render_to_response('rango/category.html', context_dict, context)
And I am also mid way through Tango with Django if you hadn't guessed ;-)
On Wednesday, 13 November 2013 12:14:40 UTC, Amimo Benja wrote:
>
> Hey all,
>
> Am currently practicing using this tutorial
> http://www.tangowithdjango.com/book/chapters/forms.html, but I'm
> constantly getting this error "The current URL,
> rango/category//add_page/, didn't match any of these." every time I click
> on the Add a Page <http://127.0.0.1:8000/rango/category//add_page/> link
> in the Category.html. I don't know how to solve it. Any help? Thanks.
>
> Here are my
> 1. Views.py http://pastebin.mozilla.org/3595121
> 2. rango/urls.py http://pastebin.mozilla.org/3595145
> 3. add_page.html http://pastebin.mozilla.org/3595156
> 4. category.html http://pastebin.mozilla.org/3595158
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/668f0b64-f008-46fe-8362-d90f47f73f0b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.