Форум сайта python.su
urlpatterns = [ path('login', views.login, name = 'login'), ]
def login(request): #return HttpResponse('<h4>LogIn page</h4>') url = 'https://login.abc.com/v2/oauth/authorize/?' parametres ={ 'a' :'response_type=code', 'b' :'redirect_uri=http%3A%2F%2Flocalhost%2Fcallback%3A8000', #http://localhost/callback:8000 'c' :'client_id=1234', 'd' :'scope=publicData', 'e' :'state=somethingunique',} return redirect(url+'&'.join(list(parametres.values())) )
Офлайн