> could do dict(archive_dict, {'template_name': 'blog/archive.html'} )
I don't think it's that easy. I get this:

>>> dict(archive_dict, {'template_name': 'blog/archive.html'} )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: dict expected at most 1 arguments, got 2

The only thing that comes to my mind is:
dict(archive_info.items() + [('template_name','blog/archive.html')] )

A bit messy though.


> On Sep 3, 8:40 am, Daniel Hepper <[EMAIL PROTECTED]> wrote:
> > Adding a comma will probably not help, because you then have 5 values in
> > the tuple, but the expected format is:
> >
> > (regular expression, Python callback function [, optional dictionary [,
> > optional name]])
> >
> > Either you put the argument 'template_name' into the archive_info dict
> > or you make two separate dicts.
> >
> > Daniel
> >
> > Am Mittwoch, den 03.09.2008, 05:26 -0700 schrieb
> > [EMAIL PROTECTED]:
> >
> > > i believe you need a comma after archive_info and before
> > > {'template_name': 'blog/archive.html'}
> >
> > > On Sep 3, 7:40 am, djandrow <[EMAIL PROTECTED]> wrote:
> > > > Can no one help me with this, its just these two lines:
> >
> > > >  (r'^archive/$', date_based.archive_index,archive_info
> > > > {'template_name': 'blog/archive.html'}),
> > > >  (r'^archive/(?P<year>d{4})/?$',date_based.archive_year, archive_info
> > > > {'template_name': 'blog/archive.html'}),
> >
> > > > Please?
> >
> > > > Andrew
> > 


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