Yeah I understand you! but is something missing me, because if I put it this way
my urls: info_dict = { 'queryset': Obra.objects.all(), 'template_object_name': 'obras', 'paginate_by': 5, 'tamplate_name': 'obras/obra_list.html', } (r'page(?P<page>[0-9]+)/$', 'django.views.generic.list_detail.object_list', info_dict), the problem is the same! but the first form was more usefull to me because I want the other generic views tha I will be using catch diferent templates (...name) I was think on use a wrap function on views.py, but I think this is a simple problem I just don't get it, can you help me? thanks Aboim On Dec 2, 2:23 pm, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Dec 2, 2010 at 2:18 PM, Carlos Aboim <abo...@gmail.com> wrote: > > Hi guys (and gals), > > Why I am getting this error? > > > Caught TypeError while rendering: dict objects are unhashable > > > I am using a generic view (object_list) to render my template. But I > > guess I am not passing all the data correctly. > > Could you show me the correct direction? > > > my urls: > > info_dict = { > > 'queryset': Obra.objects.all(), > > 'template_object_name': 'obras', > > 'paginate_by': 5, > > } > > (r'page(?P<page>[0-9]+)/$', > > 'django.views.generic.list_detail.object_list', info_dict, > > dict(template_name='obras/obra_list.html')), > > ) > > http://docs.djangoproject.com/en/1.2/topics/http/urls/#patterns > > """ > The first argument to patterns() is a string prefix. See The view prefix > below. > > The remaining arguments should be tuples in this format: > > (regular expression, Python callback function [, optional dictionary > [, optional name]]) > """ > > I doubt dict(template_name='obras/obra_list.html') is appropriate as a name. > > Cheers > > Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.