Hi,
I have URLRewriting in effect and within a function, want to redirect on
error. (in this case, I want to wrap around to first page when I reach the
end).
something along the lines of -
start_idx = int(request.args[0])
rows = db.mymodel.select(limitby=(start_idx, start_idx+page_size))
if len(rows) == 0:
return redirect('/app_url/1')
else:
#whatever...
pass
The issue is that '/app_url' is getting mapped to the /a/c/f format - I'd
like to use the URL that the user sees.
I can obviously hard code it - but seems brittle and would appreciate any
help tell me what I am missing..
cheers,
-shishir
--
Imagine there were no hypothetical situations.