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',
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'),
--
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
3 matches
Mail list logo