Re: Help with get absolute url

2006-12-14 Thread conrad22
You were quite right, Wayne, there was a mistake in my model (Charfield instead of SlugField)...so don't I feel stupid! A million thanks to everyone anyway! (I feel quite well qualified to write an idiot's guide now...) --~--~-~--~~~---~--~~ You received this me

Re: Help with get absolute url

2006-12-14 Thread Waylan Limberg
This isn't working for you? {% for organisation in object.organisation_set.all %} {{ organisation.org_name }} {% endfor %} If the name works, but not get_absolute_url I'd say you have something wrong with your model. Open a shell and play with you model to make sure everything is wor

Re: Help with get absolute url

2006-12-14 Thread conrad22
In other words, why can't I simply put {{organisation.get_absolute_url}} to return the organisation's detail page? Surely the whole point of the get_absolute_url is to be able to call an object from wherever? So what would I put in the model and/or urls.py to be able to do this? At the moment I

Re: Help with get absolute url

2006-12-13 Thread conrad22
Mmm...I actually got it to work in the category_detail template: {% for organisation in object.organisation_set.all %} {{organisation.org_name}} {% endfor %} Each category does return a list of the organisations that are in it, but what I need to do is then simply provide access to

Re: Help with get absolute url

2006-12-13 Thread Waylan Limberg
On 12/13/06, conrad22 <[EMAIL PROTECTED]> wrote: > > Yes, I know. Sorry, should have been more specific: > the problem is, that the second part of the url pattern comes from a > different model. > > I've tried > (r'^categories/(?P\d+)/(?P\w+)/$','django.views.generic.list_detail.object_detail', >

Re: Help with get absolute url

2006-12-13 Thread conrad22
Yes, I know. Sorry, should have been more specific: the problem is, that the second part of the url pattern comes from a different model. I've tried (r'^categories/(?P\d+)/(?P\w+)/$','django.views.generic.list_detail.object_detail', info_dict), but it's obviously not quite there...? How would I

Re: Help with get absolute url

2006-12-12 Thread Brett Parker
On Tue, Dec 12, 2006 at 11:13:52AM -0800, conrad22 wrote: > > Woops..see, I am already mad, as I have not communicated the actual > problem.. > > The last bit - 'categories/1/k/' returns a page/url not found error, > as follows: > > Request Method: GET > Request URL: http://127.0.0.

Re: Help with get absolute url

2006-12-12 Thread conrad22
Woops..see, I am already mad, as I have not communicated the actual problem.. The last bit - 'categories/1/k/' returns a page/url not found error, as follows: Request Method: GET Request URL:http://127.0.0.1:8000/categories/1/k/ Using the URLconf defined in kvn.urls, Django tri