Re: Redirect to named url pattern not working

2010-04-27 Thread Tom Evans
On Mon, Apr 26, 2010 at 10:16 PM, Daniel Klein wrote: > Hi, > > I'm trying to avoid hardcoding a URL in a redirect call, but I can't > for the life of me make redirect work. The relevant code segments > first: > > From urls.py: > >        url(r'^game/(\d+)/$', 'views.game',

Re: Redirect to named url pattern not working

2010-04-26 Thread Javier Guerra Giraldez
On Mon, Apr 26, 2010 at 4:16 PM, Daniel Klein wrote: > From urls.py: > >        url(r'^game/(\d+)/$', 'views.game', name='gameview'), the parameter extracted from the url doesn't have a name. change to: url(r'^game/(?P\d+)/$', 'views.game', name='gameview'), --

Redirect to named url pattern not working

2010-04-26 Thread Daniel Klein
Hi, I'm trying to avoid hardcoding a URL in a redirect call, but I can't for the life of me make redirect work. The relevant code segments first: >From urls.py: url(r'^game/(\d+)/$', 'views.game', name='gameview'), >From the view: return redirect("gameview", id