On 8/17/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> urls.py is loaded when Apache (or your server process) starts.
Correction, it's loaded when your first request comes in on a new process. ;-)
--~--~-~--~~~---~--~~
You received this message because you are
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.
On Thu, 2006-08-17 at 05:14 -0700, [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:
>
>
> > from django.core.models import LazyDate
> > ...
> >
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:
> from django.core.models import LazyDate
> ...
> 'queryset': Show.objects.filter(show_date__gte=LazyDate()),
> ...
On 8/16/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>
> would this actually work?
>
> I thought this would have been evaluated when you start up the
> process, and the show_dict is first called.
> not on every request (which is what they want I'm guessing)
Ack, you're right.
You'll need to defer
would this actually work?
I thought this would have been evaluated when you start up the
process, and the show_dict is first called.
not on every request (which is what they want I'm guessing)
regards
Ian.
On 17/08/2006, at 5:30 AM, [EMAIL PROTECTED] wrote:
>
> Do I need to import datetime
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Do I need to import datetime into urls.py or something?
from datetime import datetime
datetime.now()
should do...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've got an app for user events, using the generic list view to display
> them. So far , so good. But I don't want to display them if the date is
> past. So, how would I filter those out. Here's the template code, so
> you can sorta see
Do I need to import datetime into urls.py or something?
I'm passing
show_dict = {
'queryset': Show.objects.filter(show_date__gte=datetime.now()),
'template_object_name': 'show',
'allow_empty': 'true',
}
but it throws an error:
NameError at /shows/
name 'datetime' is not defined
I'm using the generic list view. There was some reason I didn't think
the generic date view was right for this, although I can't remember
what it was now.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I thought a change was made in the generic date views to show only
future events. It is the allow_future parameter, I believe.
Corey
On Aug 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote:
>
> I've got an app for user events, using the generic list view to
> display
> them. So far , so
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've got an app for user events, using the generic list view to display
> them. So far , so good. But I don't want to display them if the date is
> past. So, how would I filter those out. Here's the template code, so
> you can sorta see
Got it!
added import datetime
then
show_dict = {
'queryset':
Show.objects.filter(show_date__gte=datetime.datetime.now()),
'template_object_name': 'show',
'allow_empty': 'true',
}
Thank you Ian! I knew it had to be something fairly straightforward,
but sometimes it's all a matter of
I've got an app for user events, using the generic list view to display
them. So far , so good. But I don't want to display them if the date is
past. So, how would I filter those out. Here's the template code, so
you can sorta see what I'm getting at:
{% for show in
14 matches
Mail list logo