Looks great!
Stupid question... it's been a while since i've worked in django.
Where's a good place to physically store that document on the server?
sorry!

On Mar 22, 8:16 pm, Alex Gaynor <[email protected]> wrote:
> On Sun, Mar 22, 2009 at 8:15 PM, Robert <[email protected]> wrote:
>
> > Hey,
> > I'm trying to make a template that only reveals the first four items
> > of a list, and then handles the rest of the list in a different
> > respect, ie:
>
> > for item in list
> > if forloop.counter < 3 {
> > do something
> > } else {
> > do something else
> > }
>
> > but I can't come up with an eloquent way to do this in the django
> > template language. My ideas so far are as follows:
> > 1. sending two lists from the view file (a bad idea because this has
> > to be repeated for five different lists)
> > 2. doing an
> > {% ifequal __ %}
>
> > {% endifequal %}
>
> > {% ifequal __something else %}
>
> > {% endifequal %}
>
> > and so on, also not a terrific idea because it would mean having
> > like... 20 decision structures, and whatnot.
>
> > Any ideas are greatly appreciated!
> > Thanks
> > -Robert
>
> Check out james bennet's template-utils libarary which contains an {%
> iflessthan %} template tag.
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to