Hi. Im pulling my hair out trying to make this url. I have seem some
more source codes of other django projects, but I cant find anything
like my problem.
I've tried
(r'^portfolio/(?P<category_slug>[-\w]+)/(?P<project_slug>[-\w]+)$',
'myproject.portfolio.views.category_view'),
and
(r'^portfolio/(?P<category_slug>[-\w]+)/(?P<project_slug>[-\w]+)$',
'myproject.portfolio.views.category_view', dict(info_dict,
template_name="portfolio/detail_view.html")),
But I only get a Page not found (404) error, so I can't even reach the
page.
My urls looks like this now:
info_dict = {
'queryset': Project.objects.all(),
}
urlpatterns = patterns('',
#Portfolio
(r'^portfolio/$', 'django.views.generic.list_detail.object_list',
dict(info_dict, template_name="portfolio/all_projects_list.html")),
(r'^portfolio/(?P<category_slug>[-\w]+)/$',
'myproject.portfolio.views.category_view'),
(r'^portfolio/(?P<category_slug>[-\w]+)/(?P<project_slug>[-\w]+)$',
'myproject.portfolio.views.category_view', dict(info_dict,
template_name="portfolio/detail_view.html")),
}
the 2 first url rules works like they supposed, but I can't get the
detail view to work. I don't know If I need to use the same view I have
used for the category view or not.
Best regards,
Tomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---