forked from DGNum/gestioCOF
Merge branch 'master' into Kerl/settings_syntax
This commit is contained in:
commit
1a6b86703a
5 changed files with 15 additions and 9 deletions
|
@ -2,7 +2,10 @@
|
||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Inscriptions pour BDA-Revente</h2>
|
<h2>Inscriptions pour BdA-Revente</h2>
|
||||||
|
{% if success %}
|
||||||
|
<p class="success">Ton inscription a bien été prise en compte !</p>
|
||||||
|
{% endif %}
|
||||||
{% if deja_revente %}
|
{% if deja_revente %}
|
||||||
<p class="success">Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !</p>
|
<p class="success">Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -382,6 +382,7 @@ def list_revente(request, tirage_id):
|
||||||
date__gte=timezone.now())
|
date__gte=timezone.now())
|
||||||
shotgun = []
|
shotgun = []
|
||||||
deja_revente = False
|
deja_revente = False
|
||||||
|
success = False
|
||||||
for spectacle in spectacles:
|
for spectacle in spectacles:
|
||||||
revente_objects = SpectacleRevente.objects.filter(
|
revente_objects = SpectacleRevente.objects.filter(
|
||||||
attribution__spectacle=spectacle,
|
attribution__spectacle=spectacle,
|
||||||
|
@ -410,7 +411,9 @@ def list_revente(request, tirage_id):
|
||||||
deja_revente = True
|
deja_revente = True
|
||||||
else:
|
else:
|
||||||
revente.answered_mail.add(participant)
|
revente.answered_mail.add(participant)
|
||||||
|
revente.save()
|
||||||
break
|
break
|
||||||
|
success = True
|
||||||
else:
|
else:
|
||||||
form = InscriptionReventeForm(
|
form = InscriptionReventeForm(
|
||||||
tirage,
|
tirage,
|
||||||
|
@ -418,7 +421,7 @@ def list_revente(request, tirage_id):
|
||||||
|
|
||||||
return render(request, "liste-reventes.html",
|
return render(request, "liste-reventes.html",
|
||||||
{"form": form, 'shotgun': shotgun,
|
{"form": form, 'shotgun': shotgun,
|
||||||
"deja_revente": deja_revente})
|
"deja_revente": deja_revente, "success": success})
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -440,7 +443,7 @@ def buy_revente(request, spectacle_id):
|
||||||
if revente.shotgun:
|
if revente.shotgun:
|
||||||
reventes_shotgun.append(revente)
|
reventes_shotgun.append(revente)
|
||||||
|
|
||||||
if reventes_shotgun.empty():
|
if not reventes_shotgun:
|
||||||
return render(request, "bda-no-revente.html", {})
|
return render(request, "bda-no-revente.html", {})
|
||||||
|
|
||||||
if request.POST:
|
if request.POST:
|
||||||
|
|
|
@ -154,8 +154,8 @@ MAIL_DATA = {
|
||||||
'FROM': 'Le BdA <bda@ens.fr>',
|
'FROM': 'Le BdA <bda@ens.fr>',
|
||||||
'REPLYTO': 'Le BdA <bda@ens.fr>'},
|
'REPLYTO': 'Le BdA <bda@ens.fr>'},
|
||||||
'revente': {
|
'revente': {
|
||||||
'FROM': 'BDA-Revente <bda-revente@ens.fr>',
|
'FROM': 'BdA-Revente <bda-revente@ens.fr>',
|
||||||
'REPLYTO': 'BDA-Revente <bda-revente@ens.fr>'},
|
'REPLYTO': 'BdA-Revente <bda-revente@ens.fr>'},
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGIN_URL = "/gestion/login"
|
LOGIN_URL = "/gestion/login"
|
||||||
|
|
|
@ -144,9 +144,9 @@ User.profile_phone = ProfileInfo("phone", "Téléphone")
|
||||||
User.profile_occupation = ProfileInfo("occupation", "Occupation")
|
User.profile_occupation = ProfileInfo("occupation", "Occupation")
|
||||||
User.profile_departement = ProfileInfo("departement", "Departement")
|
User.profile_departement = ProfileInfo("departement", "Departement")
|
||||||
User.profile_mailing_cof = ProfileInfo("mailing_cof", "ML COF", True)
|
User.profile_mailing_cof = ProfileInfo("mailing_cof", "ML COF", True)
|
||||||
User.profile_mailing_bda = ProfileInfo("mailing_bda", "ML BDA", True)
|
User.profile_mailing_bda = ProfileInfo("mailing_bda", "ML BdA", True)
|
||||||
User.profile_mailing_bda_revente = ProfileInfo("mailing_bda_revente",
|
User.profile_mailing_bda_revente = ProfileInfo("mailing_bda_revente",
|
||||||
"ML BDA-R", True)
|
"ML BdA-R", True)
|
||||||
|
|
||||||
|
|
||||||
class UserProfileAdmin(UserAdmin):
|
class UserProfileAdmin(UserAdmin):
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{% url "bda-places-attribuees" tirage.id %}">Mes places</a></li>
|
<li><a href="{% url "bda-places-attribuees" tirage.id %}">Mes places</a></li>
|
||||||
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
|
<li><a href="{% url "bda-revente" tirage.id %}">Revendre une place</a></li>
|
||||||
<li><a href="{% url "bda-liste-revente" tirage.id %}">S'inscrire à BDA-Revente</a></li>
|
<li><a href="{% url "bda-liste-revente" tirage.id %}">S'inscrire à BdA-Revente</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="block-title">Gestion tirages BDA<span class="pull-right glyphicon glyphicon-list"></span></h3>
|
<h3 class="block-title">Gestion tirages BdA<span class="pull-right glyphicon glyphicon-list"></span></h3>
|
||||||
<div class="hm-block">
|
<div class="hm-block">
|
||||||
{% if active_tirages %}
|
{% if active_tirages %}
|
||||||
{% for tirage in active_tirages %}
|
{% for tirage in active_tirages %}
|
||||||
|
|
Loading…
Reference in a new issue