Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 June 17, 2010 04:52:07

Siddharth. S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

URLConf


Hi,

I did the following to allow the page to be loaded with or without the
'/' at the end:

(r'^mysite(/*)$', redirect_to, {'url':'/mysite/home/'}),

in URL patterns. I got an error page, and the following error:

Exception Type: TypeError at /mysite/
Exception Value: redirect_to() got multiple values for keyword
argument 'url'

Can you tell me what the problem is? Is there sufficient information?

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 17, 2010 05:57:15

Rolando E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

URLConf


On Wed, Jun 16, 2010 at 11:48 PM, Siddharth. S <sid2...@gmail.com> wrote:
> Hi,
>
> I did the following to allow the page to be loaded with or without the
> '/' at the end:
>
> (r'^mysite(/*)$', redirect_to, {'url':'/mysite/home/'}),
>
> in URL patterns. I got an error page, and the following error:
>
> Exception Type: TypeError at /mysite/
> Exception Value: redirect_to() got multiple values for keyword
> argument 'url'
>
> Can you tell me what the problem is? Is there sufficient information?

Everything grouped with ( ) in the regular expressions gets passed to
the view as arguments.

Try with: r"^mysite/?$"

Regards,

~Rolando

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 15th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support