On Mon, 2008-09-15 at 16:02 -0700, Cortland Klein wrote:
> Hi. I'm getting a TypeError on my direct_to_template url:
>
> direct_to_template() got multiple values for keyword argument 'template'
>
> urls.py:
> > from django.conf.urls.defaults import *
> >
> > urlpatterns = patterns('',
> > (r'^$', 'redacted.redacted.views.sessionform'),
> > (r'^success(.*)$',
> > 'django.views.generic.simple.direct_to_template', {'template':
> > 'success.html'}),
This URL pattern says to capture everything after "success" and that is
then passed as the first positional argument to the view. That argument
is also the template keyword argument. That's why Django is giving you
the error, because it's receiving two values for the first argument for
direct_to_template(): one via "template =..." and one via the captured
group in the pattern reg-exp.
It's unclear what you're trying to do, but you aren't going to achieve
it with an unnamed capturing group in the URL pattern there.
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---