By default, after a successful login the page directs to "default/index". I want it to redirect to some other page.
This my controller code "user.py"
def login():
form=auth.login()
if form.process().accepted:
redirect(URL('page_1'))
return dict(form=form)
This is the view code for "user/login":
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="container">
<div class="form-container">
{{=form.custom.begin}}
<input type="text" name="email" placeholder="email id" class="string" id="auth_user_email" value="" />
<input placeholder="Password" name="password" class="password" id="auth_user_password" type="password" class="field" value="" />
<div class="wrap">
<input name="submit" type="submit" class="btn" value="{{=T('Login')}}" />
<input name="sign_up" class="btn" type="submit" formaction='/{{=request.application}}/default/user/register' value="{{=T('Sign Up')}}"/>
</div>
<input name="Forgot Password" type="submit" class="btn" value="{{=T('Forgot Password')}}" formaction='/{{=request.application}}/default/user/retrieve_password' />
{{=form.custom.end}}
</div>
</div>
</body>
</html>
The thing is, when the form is getting processed, it is still redirecting to the page "default/index". I don't know where to change this default setting in the application. The code of my controller is not working properly.