On Mon, Feb 9, 2009 at 7:42 AM, Séno Hervé Edorh <senobo...@gmail.com>wrote:

> Hi,
>  I am new in django world and i am a french speaker but i will try to speak
> english in this mailling list. I have buy the book, Pratical Django projects
> of James Bennett and i have a problem somewhere. this is the error
>
> archive_index() got an unexpected keyword argument 'day'
>
>
> this is my urls.py
>
> entry_info_dict ={
>   'queryset':Entry.objects.all(),
>   'date_field':'pub_date',
> }
>
> urlpatterns = patterns('django.views.generic.date_based',
>
>      (r'^$','archive_index',entry_info_dict,'dibongo_entry_archive_index'),
> #dibongo is my application's name
>      (r'^$','object_detail', entry_info_dict,'dibongo_entry_detail'),
>
> my models.py
>
> @models.permalink
>     def get_absolute_url(self):
>             return
> ('dibongo_entry_detail',(),{'year':self.pub_date.strftime("%Y"),
>                            'month':self.pub_date.strftime("%b").lower(),
>                            'day':self.pub_date.strftime("%d"),
>                            'slug':self.slug})
>
> could you help me and explain why i have this error?
>
> Thank you
>
> >
>
I don't have my copy of Practical Django Projects handy but it looks like
you wired up the URL incorrectly, specifically the URL you are reversing to
doesn't have a regex that actually captures any of those fields, I would
take a look at the URL conf James shows and see how it differs from yours.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to