On 8/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> OK, Jeremy, Ian, you've lost me now..
>
> Is there something wrong with the code I posted above? It appears to be
> working fine. Is there something superior about this:

urls.py is loaded when Apache (or your server process) starts.
The initial code I showed (and the code you have) gets the queryset
with the .now() time of  whenever urls.py was loaded.

If your server process runs for a long time, the time will be more and
more out of sync with the -real- now().

LazyDate() is a class designed to return .now() each time it's value
is requested.
(There's been some talk of making LazyDate return just a Date, and
adding a LazyDateTime for, um, DateTime.)

...If you're recycling server processes often and you don't care too
much about the criteria being just right, then what you have now is
fine.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to