title: Redirect URL in python
body: <p>I'm breaking my head around this from couple of days now, here is the scenario.</p>
  
  <p>I have written a class for our <code>internal sso</code> validation. When my <code>Django</code> app loads i'm calling a fucntion to validate the whether the sso user is a valid one or not, if no the page should redirect to the sso login page.</p>
  
  <pre><code>import webbrowser
  @csrf_exempt
  def Sso(request):
      #Initializing the sso class 
      ssoObj = sso(True)
      applicationURL = 'http://app.com'
      if not(ssoObj._isValidUser):
          redirectionUrl = ssoObj.GetRedirectionUrl(applicationURL)
          webbrowser.open(redirectionUrl)
      return HttpResponse("reached last line")
  </code></pre>
  
  <p>Note: default <code>ssoObj._isValidUser</code> will return <code>False</code>. <code>ssoObj.GetRedirectionUrl</code> function will return <code>SSO URL + "return=" + applicationURL</code>.</p>
  
  <p>When ever the webbrowser.open is getting hit, its opening the redirected link <code>Mozilla</code>(might be my default browser,not sure). I want the redirect url to open at the same tab user is accessing the application url. How do i do this? any Suggestions are greatly appreciated.</p>