Re: Date-based generic view not working
It was in fact the timezone. A few hours later it magically worked. ;) Thanks for your help! --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Date-based generic view not working
On Fri, 2009-08-07 at 13:36 -0700, Thomas Jaggi wrote: > Well, after setting 'allow_future' to true everything works fine. > Since the entries were created today I don't really get this. I'm > using the 'pub_date' as 'date_field' and it's definitely NOT in the > future... Did you set the timezone correctly in your settings file? If you forget to specify anything, it sadly defaults to Chicago's timezone (when we all know the correct answer is Australia/Sydney), which means "now" is in the past for most of us. Secondly, if you make a typo in the timezone setting or specify one that isn't know to your system, it will end up appearing to be UTC, which is also in the past for more the majority of the planet's population. Regards, Malcolm --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Date-based generic view not working
Well, after setting 'allow_future' to true everything works fine. Since the entries were created today I don't really get this. I'm using the 'pub_date' as 'date_field' and it's definitely NOT in the future... --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Date-based generic view not working
I'm having some problems with a date-based view (using Django 1.1): Not working (no entries shown): info_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', } urlpatterns = patterns('django.views.generic.date_based', (r'^$','archive_index', dict(info_dict, template_name='xy.html')), ) {% for object in latest %} {% endfor %} Working: info_dict = { 'queryset': Entry.objects.all(), } urlpatterns = patterns('', (r'^$','django.views.generic.list_detail.object_list', dict (info_dict, template_name='xy.html')), ) {% for object in object_list %} {% endfor %} Is there an obvious solution to this? I'm sorry if there is too few information. Since I'm new to Django I probably don't know what basic information is needed to solve anything like this. Thanks, Thomas --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---