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

vip

parent 8dbd1359
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -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 check(request)[1]['role']=='vip':
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()
return redirect(mes_commandes)
if int(date_mtn.hour<7): if int(date_mtn.hour<7):
return render(request,"campagne/pas_lheure.html") return render(request,"campagne/pas_lheure.html")
if int(date_mtn.day==4): if int(date_mtn.day==4):
......
No preview for this file type
...@@ -24,7 +24,7 @@ SECRET_KEY = 'django-insecure-^pwp$p=!_g7hoyl&1kul+!v(!y9lu+6@-+1d_&auub18m^h@w( ...@@ -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! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False DEBUG = True
ALLOWED_HOSTS = ["138.195.139.213", "localhost", "astegifetobegif.cs-campus.fr", "*"] ALLOWED_HOSTS = ["138.195.139.213", "localhost", "astegifetobegif.cs-campus.fr", "*"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment