conrad22
2006-12-12 12:12:36 UTC
Hi
Hopefully someone can step in here before I go totally mad...
I am trying to define the absolute_url and/or the urls.py file to
arrive at the following:
A list of categories, which leads to a list of organisations in each
category.
I want then each organisation in the list to go to its generic object
detail page.
At the moment, all I have defined for the get_absolute urls for both
categories and organisations
is the slug: nothing else.
The urls return as follows( all using generic views):
By category list:
http://127.0.0.1:8000/categories/
By category detail:
http://127.0.0.1:8000/categories/1/ (at the moment using the
object_id)
By organisation in category detail:
http://127.0.0.1:8000/categories/1/k/ (where I've used the
get_absolute_url method in the template, and 'k' is the organisation
slug).
Could someone please lend me a hand?
A billion thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
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
-~----------~----~----~----~------~----~------~--~---
Hopefully someone can step in here before I go totally mad...
I am trying to define the absolute_url and/or the urls.py file to
arrive at the following:
A list of categories, which leads to a list of organisations in each
category.
I want then each organisation in the list to go to its generic object
detail page.
At the moment, all I have defined for the get_absolute urls for both
categories and organisations
is the slug: nothing else.
The urls return as follows( all using generic views):
By category list:
http://127.0.0.1:8000/categories/
By category detail:
http://127.0.0.1:8000/categories/1/ (at the moment using the
object_id)
By organisation in category detail:
http://127.0.0.1:8000/categories/1/k/ (where I've used the
get_absolute_url method in the template, and 'k' is the organisation
slug).
Could someone please lend me a hand?
A billion thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
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
-~----------~----~----~----~------~----~------~--~---