From 103b2880f751375a66e845f2ee36f8f69bdd9637 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Tue, 27 Sep 2016 16:57:39 +0200 Subject: [PATCH 1/2] BdA --- bda/templates/liste-reventes.html | 2 +- cof/settings_dev.py | 2 +- gestioncof/admin.py | 4 ++-- gestioncof/templates/home.html | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bda/templates/liste-reventes.html b/bda/templates/liste-reventes.html index 2a5ddc95..2a236176 100644 --- a/bda/templates/liste-reventes.html +++ b/bda/templates/liste-reventes.html @@ -2,7 +2,7 @@ {% load bootstrap %} {% block realcontent %} -

Inscriptions pour BDA-Revente

+

Inscriptions pour BdA-Revente

{% if deja_revente %}

Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !

{% endif %} diff --git a/cof/settings_dev.py b/cof/settings_dev.py index 7d270648..0ed4a618 100644 --- a/cof/settings_dev.py +++ b/cof/settings_dev.py @@ -152,7 +152,7 @@ PETITS_COURS_REPLYTO = "cof@ens.fr" RAPPEL_FROM = 'Le BdA ' RAPPEL_REPLY_TO = RAPPEL_FROM -REVENTE_FROM = 'BDA-Revente ' +REVENTE_FROM = 'BdA-Revente ' REVENTE_REPLY_TO = REVENTE_FROM LOGIN_URL = "/gestion/login" diff --git a/gestioncof/admin.py b/gestioncof/admin.py index 58b37115..eb8ad6c0 100644 --- a/gestioncof/admin.py +++ b/gestioncof/admin.py @@ -144,9 +144,9 @@ User.profile_phone = ProfileInfo("phone", "Téléphone") User.profile_occupation = ProfileInfo("occupation", "Occupation") User.profile_departement = ProfileInfo("departement", "Departement") 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", - "ML BDA-R", True) + "ML BdA-R", True) class UserProfileAdmin(UserAdmin): diff --git a/gestioncof/templates/home.html b/gestioncof/templates/home.html index 0cd32ebf..35a6bc06 100644 --- a/gestioncof/templates/home.html +++ b/gestioncof/templates/home.html @@ -43,7 +43,7 @@ {% else %}
  • Mes places
  • Revendre une place
  • -
  • S'inscrire à BDA-Revente
  • +
  • S'inscrire à BdA-Revente
  • {% endif %} {% endfor %} @@ -83,7 +83,7 @@ {% endfor %} -

    Gestion tirages BDA

    +

    Gestion tirages BdA

    {% if active_tirages %} {% for tirage in active_tirages %} From 284dc12b7c1a9b212ec2bbad47e51ea0e9e61d34 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Tue, 27 Sep 2016 17:35:29 +0200 Subject: [PATCH 2/2] success message --- bda/templates/liste-reventes.html | 3 +++ bda/views.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bda/templates/liste-reventes.html b/bda/templates/liste-reventes.html index 2a236176..78f3ac08 100644 --- a/bda/templates/liste-reventes.html +++ b/bda/templates/liste-reventes.html @@ -3,6 +3,9 @@ {% block realcontent %}

    Inscriptions pour BdA-Revente

    + {% if success %} +

    Ton inscription a bien été prise en compte !

    + {% endif %} {% if deja_revente %}

    Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !

    {% endif %} diff --git a/bda/views.py b/bda/views.py index e9a000cb..c72e5b1d 100644 --- a/bda/views.py +++ b/bda/views.py @@ -382,6 +382,7 @@ def list_revente(request, tirage_id): date__gte=timezone.now()) shotgun = [] deja_revente = False + success = False for spectacle in spectacles: revente_objects = SpectacleRevente.objects.filter( attribution__spectacle=spectacle, @@ -410,7 +411,9 @@ def list_revente(request, tirage_id): deja_revente = True else: revente.answered_mail.add(participant) + revente.save() break + success = True else: form = InscriptionReventeForm( tirage, @@ -418,7 +421,7 @@ def list_revente(request, tirage_id): return render(request, "liste-reventes.html", {"form": form, 'shotgun': shotgun, - "deja_revente": deja_revente}) + "deja_revente": deja_revente, "success": success}) @login_required