Commit 34663289 authored by Louis's avatar Louis

Limite à 5 le nombre d'exemplaire de chaque exercice.

parent 38620439
......@@ -28,12 +28,12 @@ def creer(request):
for key in request.GET:
if key in BAG:
number = 0
for string in request.GET[key]:
for string in request.GET.getlist(key):
try:
number += int(string)
except ValueError:
pass
for i in range(number):
for i in range(min(5, number)):
exercices.append(BAG[key]())
# Génération du PDF
if exercices:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment