Skip to content
Snippets Groups Projects
Commit 2845c36c authored by Milo Hivert's avatar Milo Hivert
Browse files

coupure de la hotline la nuit

parent ecd13031
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ body{ ...@@ -22,6 +22,7 @@ body{
background-attachment: fixed; background-attachment: fixed;
background-size: 100%; background-size: 100%;
padding: 10% 3% 3% 3%; padding: 10% 3% 3% 3%;
margin-bottom:30px;
} }
@media (min-width : 50em){ @media (min-width : 50em){
......
var nb = 15 ;
timer = window.setTimeout(" window.refresh();", 1000*nb, "JavaScript");
\ No newline at end of file
...@@ -74,4 +74,5 @@ ...@@ -74,4 +74,5 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="{% static 'campagne/js/actualisation.js' %}" ></script>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'campagne/base.html'%}
{% load static %}
{% block cssEtTitre %}
<link rel="stylesheet" href="{% static 'campagne/css/hotline.css' %}" />
{% endblock %}
{% block content %}
<div class="block_commande">
<p>La hotline n'est ouverte qu'entre 7h et minuit.</p>
</div>
{% endblock %}
\ No newline at end of file
...@@ -38,4 +38,5 @@ ...@@ -38,4 +38,5 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="{% static 'campagne/js/actualisation.js' %}" ></script>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -99,6 +99,10 @@ def commande_passee(request, requete): ...@@ -99,6 +99,10 @@ def commande_passee(request, requete):
if durée_dernière_commande <= temps_entre_commandes: if durée_dernière_commande <= temps_entre_commandes:
patiente=temps_entre_commandes-durée_dernière_commande patiente=temps_entre_commandes-durée_dernière_commande
return render(request,"campagne/patiente.html",{"min":patiente//60, "sec":patiente%60}) return render(request,"campagne/patiente.html",{"min":patiente//60, "sec":patiente%60})
if int(date_mtn.hour<7):
return render(request,"campagne/pas_lheure.html")
if int(date_mtn.day==4):
return HttpResponse("La hotline ouvre demain à 7h.")
commande=commande_crepe.objects.create(adresse_livraison=L[5], crepe_nature=L[0], crepe_nutella=L[1], crepe_sucre=L[2], crepe_confiture_fraise=L[3],crepe_confiture_abricot=L[4],commanditaire=utilisateur.objects.get(email=mail)) commande=commande_crepe.objects.create(adresse_livraison=L[5], crepe_nature=L[0], crepe_nutella=L[1], crepe_sucre=L[2], crepe_confiture_fraise=L[3],crepe_confiture_abricot=L[4],commanditaire=utilisateur.objects.get(email=mail))
commande.save() commande.save()
#send_mail('commande crêpes', #send_mail('commande crêpes',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment