Re: Altering database object

2009-05-03 Thread Vedlen
Thank you very much guys. I used George's way to get it working. Thanks again Vedlen On May 3, 12:32 pm, Daniel Roseman wrote: > On May 3, 2:24 am, Vedlen wrote: > > > > > I've got multiple tuples, and I need all the fields. > > I just need to pass all the "moment" fields from the tuples, in

Re: Altering database object

2009-05-03 Thread Daniel Roseman
On May 3, 2:24 am, Vedlen wrote: > I've got multiple tuples, and I need all the fields. > I just need to pass all the "moment" fields from the tuples, into my > function. > > Here is what my template looks like : > > > {{ for s in Score }} > {{ s.moment }}{{ s.someOtherField }} > {{ endfor }} >

Re: Altering database object

2009-05-02 Thread Michael
On Sat, May 2, 2009 at 9:37 PM, George Song wrote: > I think the easiest solution for you is to write a custom method on your > Score model: > You might also want to look at writing a template tag or filter. In this case a simple filter would be: from django import template registry = templat

Re: Altering database object

2009-05-02 Thread George Song
On 5/2/2009 6:24 PM, Vedlen wrote: > I've got multiple tuples, and I need all the fields. > I just need to pass all the "moment" fields from the tuples, into my > function. > > Here is what my template looks like : > > > {{ for s in Score }} > {{ s.moment }}{{ s.someOtherField }} > {{ endfor }}

Re: Altering database object

2009-05-02 Thread Vedlen
I've got multiple tuples, and I need all the fields. I just need to pass all the "moment" fields from the tuples, into my function. Here is what my template looks like : {{ for s in Score }} {{ s.moment }}{{ s.someOtherField }} {{ endfor }} It's like I'd need to do this : {{ for s in Score

Re: Altering database object

2009-05-02 Thread Daniel Roseman
On May 2, 3:39 pm, Vedlen wrote: > Hi everybody, > > I started working with Django very recently and I'm basically a PHP > developer so I'm pretty much confused with lots of different things > right now as I'm getting used to Django ;) > > Here's my problem : > > First off, I fetch values from my

Altering database object

2009-05-02 Thread Vedlen
Hi everybody, I started working with Django very recently and I'm basically a PHP developer so I'm pretty much confused with lots of different things right now as I'm getting used to Django ;) Here's my problem : First off, I fetch values from my database : s = Score.objects.filter(blablabla).o