Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
Oh for $hit's sake - how can I be so blind?! Thanks Malcom, Brandon On Oct 7, 7:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-10-07 at 16:01 -0700, Brandon Taylor wrote: > > Hi everyone, > > > Here is my code: > > > entry_info_dict = { > >     'queryset' :

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 16:01 -0700, Brandon Taylor wrote: > Hi everyone, > > Here is my code: > > entry_info_dict = { > 'queryset' : Entry.live.all(), > 'date_field' : 'pub_date', > 'allow_future' : True > } > > urlpatterns = patterns('django.views.generic.date_based', >

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Steve Holden
Brandon Taylor wrote: > My db record's pub_date field value is: 2008-09-17 16:39:52 > > When I step through the debugger for archive year, and the following > code is executed: > > lookup_kwargs = {'%s__year' % date_field: year} > > 'year' is being passed in from the keyword argument ?P from the

Re: generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
My db record's pub_date field value is: 2008-09-17 16:39:52 When I step through the debugger for archive year, and the following code is executed: lookup_kwargs = {'%s__year' % date_field: year} 'year' is being passed in from the keyword argument ?P from the URL, but once it hits this

generic.date_based.archive_year throws "invalid literal for int() with base 10: ''

2008-10-07 Thread Brandon Taylor
Hi everyone, Here is my code: entry_info_dict = { 'queryset' : Entry.live.all(), 'date_field' : 'pub_date', 'allow_future' : True } urlpatterns = patterns('django.views.generic.date_based', url(r'^blog/(?P)\d{4}/$', 'archive_year', entry_info_dict, name='archive_year'), ) So,