Great ideas! Thanks Kelvin. I'll definitely try it out and post the
results here,
robo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googleg
robo wrote:
> I assume you guys also know python. If so, I wish to get some help
> with this implementation:
> What I want to return is a new variable each time through the for
> loop:
>
If I am understanding this correctly, take a look at setattr()
You would have to do something like this, I t
I assume you guys also know python. If so, I wish to get some help
with this implementation:
What I want to return is a new variable each time through the for
loop:
catQuantity = len(categoryList)
for x in catQuantity:
cat(x) = get_object_or_404(Category, cat_order=x)
return cat(x)
Thi
On Fri, 2007-05-18 at 00:29 -0700, robo wrote:
> Hi Kelvin,
>
> > You could limit the list from the query ... Model.objects.all()[:2]
>
> I have tried Project.objects.all()[:3] in hopes that the 3rd time
> through the loop, it would show the "see more ..." link. But what this
> actually gives me
Hi Kelvin,
> You could limit the list from the query ... Model.objects.all()[:2]
I have tried Project.objects.all()[:3] in hopes that the 3rd time
through the loop, it would show the "see more ..." link. But what this
actually gives me is the first 3 projects, not 3 projects for each
category. H
Hey Robo:
You could limit the list from the query ... Model.objects.all()[:2]
But I think the easiest way would be using the slice tag inside the
template.
{{ some_list|slice:":2" }}
Tried these methods yet?
Kelvin
robo wrote:
> Hi everyone, I've set up my code to display a page that shows
Hi everyone, I've set up my code to display a page that shows all
categories and projects belonging to each category. Pseudo code like
so:
for category in category
for project in project
ifequal project.category_id category.id
{{project.title}}
endifequal
endfor
endfor
Right no
7 matches
Mail list logo