def _third_party_login_url(backend_name, auth_entry, redirect_url=None):
 params = [('auth_entry', auth_entry)]
 if redirect_url:
  params.append(('next', redirect_url))
 return u'{url}?{params}'.format(url=reverse('social:begin', kwargs={'backend': backend_name}), params=urllib.urlencode(params))

def _third_party_login_url ( backend_name , auth_entry , redirect_url = None ) : params = [ ( 'auth_entry' , auth_entry ) ] if redirect_url : params . append ( ( 'next' , redirect_url ) ) return u'{url}?{params}' . format ( url = reverse ( 'social:begin' , kwargs = { 'backend' : backend_name } ) , params = urllib . urlencode ( params ) )
construct the login url to start third party authentication .