On Mon, 20 Oct 2008 12:24:14 -0700, Robocop wrote:
> oops! Sorry about that, i should have just copied my code directly. I
> actually did specify an int in range:
>> > year = '2008'
>> > month = '09'
>> > limit = '31'
>> > for i in range(1,int(limit)):
>
> The code is currently failing due to t
date = "%s-%s-%s" % (year, month, i) is exactly what i'd like to do.
The Table object will just be a mysql table, and the filter function
will yield a list filtered for those dates.
For my purposes the limit variable will not be static, depending on
which day of the month it is i will only want it
Robocop wrote:
oops! Sorry about that, i should have just copied my code directly.
I actually did specify an int in range:
year = '2008'
month = '09'
limit = '31'
for i in range(1,int(limit)):
The code is currently failing due to the syntax in the filter,
particularly the section "date = yea
oops! Sorry about that, i should have just copied my code directly.
I actually did specify an int in range:
> > year = '2008'
> > month = '09'
> > limit = '31'
> > for i in range(1,int(limit)):
The code is currently failing due to the syntax in the filter,
particularly the section "date = year'-
On Mon, Oct 20, 2008 at 12:08 PM, Robocop <[EMAIL PROTECTED]> wrote:
> Is it possible to do something like this syntactically:
>
> year = '2008'
> month = '09'
> limit = '31'
> for i in range(1,limit):
This previous line will fail. range() takes numbers, not strings.
Change 'limit' to an int.
>
Is it possible to do something like this syntactically:
year = '2008'
month = '09'
limit = '31'
for i in range(1,limit):
temp = Table.objects.filter(date = year'-'month'-'i)