Re: Best way to template "," and "and" separated lists?

2008-02-07 Thread toomim
On Feb 7, 3:55 am, Ned Batchelder <[EMAIL PROTECTED]> wrote: > The nth tag doesn't exist yet, but does it look like what you are asking > for? Yes, this would be a pretty good solution to the problem. Thank you everyone for your help. --~--~-~--~~~---~--~~ You rec

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 11:05 pm, toomim <[EMAIL PROTECTED]> wrote: > I don't understand, how do I get {{sep}} to change from ',' to 'and' > and then to the empty string in the last 2 iterations of the loop, > without using a bunch of if statements? (And since we&#x

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 9:25 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 07-Feb-08, at 10:45 AM, toomim wrote: > > compute and add these in your view - you need an extra field, say,   > 'sep' which would be ',', '' or 'and' and in your temp

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 9:29 pm, "Swaroop C H" <[EMAIL PROTECTED]> wrote: > If I've understood your question correctly, you can use 'forloop.last' > to determine if you're in the last iteration... > seehttp://www.djangobook.com/en/1.0/chapter04/for details. Yes, that's what I use for the last iteration. Then

Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
I am looping through a list of people, and want to output their hyperlinked names separated by commas and then the word "and". It should look like this: Bob, Fred, Deidre and Kelly What is the best way of implementing this in a django template? Right now I'm using a {% for %} loop, where each it

Re: Stuck implementing editable ordered lists

2007-12-12 Thread toomim
ForiegnKey works great! Thanks so much man! The drop-menu of choices is a good idea too. I'll do that! On Dec 12, 2:19 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > However, after I have SAVED a pub, I cannot change the Person field of > > its PubAuthors from the inlined page on the P

Stuck implementing editable ordered lists

2007-12-12 Thread toomim
Hi, I'm having trouble. My model has publications and authors, and the order of authors matters and should be specified by users of the admin interface. To implement the ordered list, I made an intermediary model called "PubAuthor", where the user has to enter a number for each author to specify t