Re: Re: Re: Re: Custom view problems

2006-10-24 Thread luxagraf
Russ- print_r does roughly what {% debug %} does, thanks for that tip. I realized that I can't use the method you mentioned because my Tag model has a slug field but the Essay model only stores the Tag.name value, which is fine until I have multiword tags. So i'd either need to strip out the das

Re: Re: Re: Custom view problems

2006-10-24 Thread Russell Keith-Magee
On 10/24/06, luxagraf <[EMAIL PROTECTED]> wrote: > > Which works and the template loads, but there doesn't seem to be > anything in the object essay_list... Your view and template appear to be ok, as long as the 'tag' argument is of a type compatible with the query. > is there a > python way to

Re: Re: Re: Custom view problems

2006-10-24 Thread luxagraf
Russ- Okay, one more question I changed the view around to make the code a bit cleaner and use your suggestion as well as the render_to_response shortcut I read about in the docs.. def view_items_tagged(request, tag): essay_list = Essay.objects.filter(tags=tag) return render_to_response

Re: Re: Custom view problems

2006-10-23 Thread Russell Keith-Magee
On 10/24/06, luxagraf <[EMAIL PROTECTED]> wrote: > > Russ- > > ah. okay that makes sense. I was assuming that entry_set was a > contruct itself, but it's actually modelname_set... Yup. > So to make it purely abstract, things are working like this: > > response_obj = get_object_or_404(Model, para

Re: Re: Custom view problems

2006-10-23 Thread luxagraf
Russ- ah. okay that makes sense. I was assuming that entry_set was a contruct itself, but it's actually modelname_set... So to make it purely abstract, things are working like this: response_obj = get_object_or_404(Model, param=value) response_obj.modelname_set.all().select_related() and I can