Désactive le lancement du tirage automatiquement

Après le lancement du tirage, l'attribut `enable_do_tirage` est
automatiquement passé à `False`
This commit is contained in:
Martin Pépin 2016-07-08 20:27:27 +02:00
parent 45864fdcb0
commit 443b732859
3 changed files with 8 additions and 11 deletions

View file

@ -10,8 +10,9 @@
<h1>Attributions</h1> <h1>Attributions</h1>
<br /> <br />
<h2 class="important">Pensez à désactiver le lancement du tirage dès maintenant dans <p class="success">Pour raison de sécurité, le lancement du tirage
l'<a href="{% url "admin:index" %}">interface admin</a>&#8239;</h2> a été désactivé. Vous pouvez le réactiver dans
l'<a href="{% url "admin:index" %}">interface admin</a></p>
<h2>Token :</h2> <h2>Token :</h2>
<pre>{{ token }}</pre> <pre>{{ token }}</pre>

View file

@ -239,6 +239,7 @@ def do_tirage(request, tirage_id):
tirage_elt.tokens += "%s\n\"\"\"%s\"\"\"\n" % ( tirage_elt.tokens += "%s\n\"\"\"%s\"\"\"\n" % (
timezone.now().strftime("%y-%m-%d %H:%M:%S"), timezone.now().strftime("%y-%m-%d %H:%M:%S"),
form.cleaned_data['token']) form.cleaned_data['token'])
tirage_elt.enable_do_tirage = False
tirage_elt.save() tirage_elt.save()
for (show, members, _) in results: for (show, members, _) in results:
for (member, _, _, _) in members: for (member, _, _, _) in members:

View file

@ -240,21 +240,16 @@ fieldset legend {
background-color: transparent; background-color: transparent;
} }
.success a {
color: inherit;
}
.error { .error {
font-weight: bold; font-weight: bold;
color: #B00000; color: #B00000;
background-color: transparent; background-color: transparent;
} }
.important {
font-weight: bold;
color: #F90;
}
.important a {
color: #F90;
}
#main form ul.errorlist li { #main form ul.errorlist li {
font-weight: bold; font-weight: bold;
color: #B00000; color: #B00000;