Re: User profile and sliding date range data model?

2007-03-30 Thread Rob Hudson
James Bennett wrote: > On 3/29/07, Rob Hudson <[EMAIL PROTECTED]> wrote: >> I can't think of a way to account for "up to last 3 years" and "up to >> the next 5 years" or variation thereof. > > paid_up_until = models.DateField() > > Then use Python's standard 'datetime.timedelta' to handle

Re: User profile and sliding date range data model?

2007-03-30 Thread David Reynolds
On 30 Mar 2007, at 9:21 am, David Reynolds wrote: > > One of the things that annoys me about datetime is that it doesn't > handle leap years properly. However, if you use python-dateutil[1] it > has a relativedelta so you can do things like: > datetime.date.today()+relativedelta(years=+3)

Re: User profile and sliding date range data model?

2007-03-30 Thread David Reynolds
On 30 Mar 2007, at 2:32 am, James Bennett wrote: > > On 3/29/07, Rob Hudson <[EMAIL PROTECTED]> wrote: >> I can't think of a way to account for "up to last 3 years" and "up to >> the next 5 years" or variation thereof. > > paid_up_until = models.DateField() > > Then use Python's standard

Re: User profile and sliding date range data model?

2007-03-29 Thread James Bennett
On 3/29/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > I can't think of a way to account for "up to last 3 years" and "up to > the next 5 years" or variation thereof. paid_up_until = models.DateField() Then use Python's standard 'datetime.timedelta' to handle offets; e.g., if a member pays up for

User profile and sliding date range data model?

2007-03-29 Thread Rob Hudson
I'm trying to think how I can solve this problem in my data model and I'm coming up empty. I thought I'd post it here to see if anyone else had a good idea... I built a members-only website for due paying members. We'd like to use the profile via the Django admin as a way to track which