Skip to content
Snippets Groups Projects
Commit 9de3da59 authored by Bertille Bouget's avatar Bertille Bouget
Browse files

test

parent d1bca7a8
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ body{
}
.wrapper{
background-image: url("./images/banquet.png");
background-image: url("/site-campagne/site_campagne/campagne/static/campagne/images/bg.png");
background-attachment: fixed;
background-size: 100%;
padding: 20% 3% 3% 3%;
......
......@@ -11,9 +11,25 @@
}
#commande_crepe{
margin: 10vh;
background-color:lightgrey;
margin: 4% 5% 5% 5%;
background-color:black;
padding: 2%;
align-items: center;
text-align: center;
display: flex;
justify-content: center;
}
.conteneur_crepe{
background-color: antiquewhite;
border-radius: 10px;
margin: 2%;
padding: 2%;
text-align: center;
align-items: center;
width: 100%;
}
#bouton_crepes{
background-color: antiquewhite;
}
site_campagne/campagne/static/campagne/images/bg.png

1.92 MiB | W: | H:

site_campagne/campagne/static/campagne/images/bg.png

1.7 MiB | W: | H:

site_campagne/campagne/static/campagne/images/bg.png
site_campagne/campagne/static/campagne/images/bg.png
site_campagne/campagne/static/campagne/images/bg.png
site_campagne/campagne/static/campagne/images/bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,34 +7,49 @@
{% endblock %}
{% block content %}
<br>
<br>
<h1 style="color:#e7c021;text-align: center;">HOTLINE</h1>
<div id= "commande_crepe">
<div class="conteneur_crêpes">
<div class="test">
<div class="conteneur_crepe">
Crêpes natures
<img src="{% static 'campagne/images/nature.jpeg' %}" style="vertical-align: middle;height: 3em;">
<input id="nature" type="number" value=0 min=0 max=40 />
<h4>Crêpes natures</h4>
<br>
<img src="{% static 'campagne/images/nature.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="nature" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes nutella: </p>
<input id="nutella" type="number" value=0 min=0 max=40 />
<h4>Crêpes nutella</h4>
<br>
<img src="{% static 'campagne/images/nutella.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="nutella" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes sucre: </p>
<input id="sucre" type="number" value=0 min=0 max=40 />
<h4>Crêpes sucre</h4>
<br>
<img src="{% static 'campagne/images/sucre.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="sucre" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes confiture: </p>
<input id="confiture" type="number" value=0 min=0 max=40 />
<h4>Crêpes confiture</h4>
<br>
<img src="{% static 'campagne/images/confiture.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="confiture" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div>
<br>
<div class="conteneur_crepe">
<p>Adresse de livraison</p>
<input id="adresse" type="text"/>
</div>
</div>
<div id="passer_commande">
<button id="bouton_crepes">Commander</button>
<button id="bouton_crepes" style="font-size: 20px;">Commander</button>
</div>
</div>
</div>
<script type="text/javascript" src="{% static 'campagne/js/hotline.js' %}" ></script>
{% endblock %}
\ No newline at end of file
......@@ -7,34 +7,49 @@
{% endblock %}
{% block content %}
<br>
<br>
<h1 style="color:#e7c021;text-align: center;">HOTLINE</h1>
<div id= "commande_crepe">
<div class="conteneur_crêpes">
<div class="test">
<div class="conteneur_crepe">
Crêpes natures
<img src="{% static 'campagne/images/nature.jpeg' %}" style="vertical-align: middle;height: 3em;">
<input id="nature" type="number" value=0 min=0 max=40 />
<h4>Crêpes natures</h4>
<br>
<img src="{% static 'campagne/images/nature.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="nature" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes nutella: </p>
<input id="nutella" type="number" value=0 min=0 max=40 />
<h4>Crêpes nutella</h4>
<br>
<img src="{% static 'campagne/images/nutella.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="nutella" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes sucre: </p>
<input id="sucre" type="number" value=0 min=0 max=40 />
<h4>Crêpes sucre</h4>
<br>
<img src="{% static 'campagne/images/sucre.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="sucre" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div class="conteneur_crepe">
<p>Crêpes confiture: </p>
<input id="confiture" type="number" value=0 min=0 max=40 />
<h4>Crêpes confiture</h4>
<br>
<img src="{% static 'campagne/images/confiture.jpeg' %}" style="vertical-align: middle;width: 70%;">
<br><br>
<input id="confiture" type="number" value=0 min=0 max=40 style="padding: 1%;"/>
</div>
<div>
<br>
<div class="conteneur_crepe">
<p>Adresse de livraison</p>
<input id="adresse" type="text"/>
</div>
</div>
<div id="passer_commande">
<button id="bouton_crepes">Commander</button>
<button id="bouton_crepes" style="font-size: 20px;">Commander</button>
</div>
</div>
</div>
<script type="text/javascript" src="{% static 'campagne/js/hotline.js' %}" ></script>
{% endblock %}
\ No newline at end of file
......@@ -10,16 +10,16 @@ import json
from django.core.mail import send_mail
def test(request):
return render(request,'/campagne/hot.html')
return render(request,'campagne/test.html')
def connexion(request):
return HttpResponseRedirect('https://auth.viarezo.fr/oauth/authorize/?redirect_uri=https://localhost:8000/&client_id=2fe828e15647fc92437727b6646ce5c799c40991&response_type=code&state=sqdkfjhsqdkf&scope=default')
return HttpResponseRedirect('https://auth.viarezo.fr/oauth/authorize/?redirect_uri=http://localhost:8000&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 = 'https://localhost:8000'
redirect_url = 'http://localhost:8000'
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})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment