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<year> from the
URL, but once it hits this function, year = u''

I'm using 1.0 Final, MySQL 5. Help!



On Oct 7, 6:01 pm, Brandon Taylor <[EMAIL PROTECTED]> 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',
>     url(r'^blog/(?P<year>)\d{4}/$', 'archive_year', entry_info_dict,
> name='archive_year'),
> )
>
> So, when I hit:http://localhost:8000/blog/2008/sep/
>
> I get: invalid literal for int() with base 10: ''
>
> I know these values are valid, as I have an Entry in the database and
> my URL param is populated form the DB. I have also visually verified
> that the values are correct. What can I possibly be doing wrong here?
>
> I'm using Aptana with PyDev, and have stepped through the debugger for
> the archive_year function, and I'm just not seeing what the problem
> is. Anyone else seeing something similar?
>
> TIA,
> Brandon
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to