Re: Looking at objects by year, month

2008-05-11 Thread Ryan Vanasse
I ended up using the "divisibleby" filter and that worked out fine. Thank you for both of your ideas! I learn so much through this group. Thank you very much. Ryan Vanasse On May 2, 9:27 pm, Pawel Pilitowski <[EMAIL PROTECTED]> wrote: > Maybe something like this would help: > > in the month loo

Re: Looking at objects by year, month

2008-05-02 Thread Pawel Pilitowski
Maybe something like this would help: in the month loop: {% if forloop.counter|divisibleby:"2" %} {% else %} {% endif %} or try forloop.parentloop.counter if you need to get at it from you event loop. Cheers, Pawel On 03/05/2008, at 11:15 AM, Darryl Ross wrote: Ryan Va

Re: Looking at objects by year, month

2008-05-02 Thread Darryl Ross
Ryan Vanasse wrote: Now, my problem is that for every month, I want a different color of image text... //blue/orange swap so that on even months i'd have them come from the blue folder and odd months they'd come from the orange folder (or something of that nature). As far as I can tell, none of

Re: Looking at objects by year, month

2008-05-02 Thread Ryan Vanasse
I got my data to populate mostly alright. The key was changing the template example to "{% for month in months.values %}" it wasn't working before that. Now, my problem is that for every month, I want a different color of image text... //blue/orange swap so that on even months i'd have them com

Re: Looking at objects by year, month

2008-05-01 Thread Ryan Vanasse
Is events in: for event in Event.objects.order_by('start_DateTime'): events[event.start_DateTime.month]['events'].append(event) supposed to be months? (looks like months[event.start_DateTime.month] ['events'].append(event) I get a NameError if I leave it as is. when I switch to months

Re: Looking at objects by year, month

2008-04-28 Thread Darryl Ross
Ryan Vanasse wrote: Trying to get the outer for loop working is something that I don't really understand. I think that what I have now isn't going to work because I'm using a dictionary reference on what was transmuted into the Context, so that "eventsByMonth" doesn't exist... I've been trying

Looking at objects by year, month

2008-04-28 Thread Ryan Vanasse
Hello. Thank you for your helpfulness and friendliness on this group. I have found it very helpful in getting me past some of the rough spots in starting out with django. I'm creating a calendar of events. I want to show an entire year's worth of events, but group them on the page into months. F