flynn
flynn

Reputation: 1584

Redirect Route strict slash

I'm trying to use strict slash with webapp2 redirect route and I'm getting this value error -

ValueError: Routes with strict_slash must have a name.

This is an example of one of my routes -

RedirectRoute(r'/',handler=IndexHandler,strict_slash=True)

It works fine if I don't have the strict_slash bit.

Upvotes: 3

Views: 480

Answers (1)

Ryan Morlok
Ryan Morlok

Reputation: 806

I don't know why routes with a strict_slash need to have a name, but the following should work:

RedirectRoute(r'/',handler=IndexHandler,strict_slash=True,name='some_name')

Upvotes: 5

Related Questions