From 12c7762bd4e40e13a33a0b724dea2c37a1e4944a Mon Sep 17 00:00:00 2001 From: Hivert Milo <milo.hivert@student-cs.fr> Date: Mon, 5 Dec 2022 02:27:33 +0100 Subject: [PATCH] version vm --- .../__pycache__/views.cpython-310.pyc | Bin 12503 -> 12561 bytes .../campagne/static/campagne/js/hotline.js | 2 +- site_campagne/campagne/views.py | 4 ++-- .../__pycache__/settings.cpython-310.pyc | Bin 2899 -> 2899 bytes site_campagne/site_campagne/settings.py | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site_campagne/campagne/__pycache__/views.cpython-310.pyc b/site_campagne/campagne/__pycache__/views.cpython-310.pyc index c5ee19939a6eb7c3866c5878dfb42bb5369d9fd8..2977b8d62046c3f9857809a894280bfa6694ab72 100644 GIT binary patch delta 137 zcmcbfI5CMYpO=@5fq{Wxu}5z*o7G0XICjSKlXKav^op(Y^%ILrQqwcjQcLoaK(t<R vv2Jo=Zb50WURsfUW?o5ZQEqBVW@2Vh>gFBnoJ__>86_nJq-k7yol_kEVhS*y delta 79 zcmbQ3bUl$TpO=@5fq{WR)x9_QjO9kYICjQOlXKav1g-S-bMliDb29RaOROvm3=B43 UW#?oP6U`_oDZr3hEXbt}0HzWbhX4Qo diff --git a/site_campagne/campagne/static/campagne/js/hotline.js b/site_campagne/campagne/static/campagne/js/hotline.js index 717bb8f0..8aaecb19 100644 --- a/site_campagne/campagne/static/campagne/js/hotline.js +++ b/site_campagne/campagne/static/campagne/js/hotline.js @@ -70,7 +70,7 @@ function f (){ paraph.classList.add("text_box"); } if (adresse!=="" && somme >0 && somme <= 40 ){ - window.location = "http://localhost:8000/mes_commandes/"+nature+"_"+nutella+"_"+sucre+"_"+fraise+"_"+abricot+"_"+adresse+"_"; + window.location = "https://astegifetobegif.cs-campus.fr/mes_commandes/"+nature+"_"+nutella+"_"+sucre+"_"+fraise+"_"+abricot+"_"+adresse+"_"; } } } diff --git a/site_campagne/campagne/views.py b/site_campagne/campagne/views.py index f764aadd..7086123a 100644 --- a/site_campagne/campagne/views.py +++ b/site_campagne/campagne/views.py @@ -28,13 +28,13 @@ def decryptmess(message): def connexion(request): - return HttpResponseRedirect('https://auth.viarezo.fr/oauth/authorize/?redirect_uri=http://localhost:8000&client_id=2fe828e15647fc92437727b6646ce5c799c40991&response_type=code&state=sqdkfjhsqdkf&scope=default') + return HttpResponseRedirect('https://auth.viarezo.fr/oauth/authorize/?redirect_uri=https://astegifetobegif.cs-campus.fr/intermediaire&client_id=2fe828e15647fc92437727b6646ce5c799c40991&response_type=code&state=sqdkfjhsqdkf&scope=default') def login(request): #on a le state et le authorization code dans le request code = str(request.GET['code']), state = str(request.GET['state']) url = 'https://auth.viarezo.fr/oauth/token' - redirect_url = 'http://localhost:8000' + redirect_url = 'https://astegifetobegif.cs-campus.fr/intermediaire' jso = requests.post(url, data={'grant_type':'authorization_code','code':code,'redirect_uri':redirect_url,'client_id':'2fe828e15647fc92437727b6646ce5c799c40991','client_secret':'f306614fc96833e80af693f2991901bc54a9cf9a'}).json() access_token = jso['access_token'] r = requests.get("https://auth.viarezo.fr/api/user/show/me", headers={"Authorization" : "Bearer "+access_token}) diff --git a/site_campagne/site_campagne/__pycache__/settings.cpython-310.pyc b/site_campagne/site_campagne/__pycache__/settings.cpython-310.pyc index e68672305e49da91aec32466ac5a98960af643db..5fd6e62ff66ff332463d83101b6d8145e2ca2255 100644 GIT binary patch delta 158 zcmcaCc3F%!pO=@5fq{YHm`882|3u!bV6GJIbcPh3MU0t@DZF!7(ix+8Q~09zQutE@ zQrS`jr5RF$<}hV4M)9Wzr-)=SrU<8qf=MwjDW1ug&Jrb%A`vB+A{ix=!WAW)!ZPuc zxg<-Je2QX}LW)w9Vv2H<Qi@8Hatc?JN(#$nDaHwmjBcA(Gj%aBhHN%vtzz1|fqgME E0MnHxF#rGn delta 158 zcmcaCc3F%!pO=@5fq{X+-L*H_Zz6A2FiQ$oIztNgBF0R{6rMRO>5NglDZEj9DSRpX zscb0%(hMnrbC@z2qxe&VQiL-ZQ-o4Pz@#Xc6w72xXNeL>5swl~k%$sXVTlq>k(_wS zTv9ShK1DG~Aw?-lF-18_DMckpIfW%kB}H<x6ypR&#*odcnYx%Zo3U0gF}iKuz`mFn E0ExvW$^ZZW diff --git a/site_campagne/site_campagne/settings.py b/site_campagne/site_campagne/settings.py index ac8f4785..5b4ba96d 100644 --- a/site_campagne/site_campagne/settings.py +++ b/site_campagne/site_campagne/settings.py @@ -24,7 +24,7 @@ SECRET_KEY = 'django-insecure-^pwp$p=!_g7hoyl&1kul+!v(!y9lu+6@-+1d_&auub18m^h@w( # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ["138.195.139.213", "localhost", "astegifetobegif.cs-campus.fr", "*"] -- GitLab