forked from DGNum/gestioCOF
Merge branch 'master' into Kerl/mails_rappel
This commit is contained in:
commit
4abf3a5f19
14 changed files with 9 additions and 50 deletions
|
@ -1,7 +1,6 @@
|
|||
# coding: utf-8
|
||||
|
||||
from django.core.mail import send_mail
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
from django.contrib import admin
|
||||
from django.db.models import Sum, Count
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
from __future__ import division
|
||||
|
||||
from django.conf import settings
|
||||
from django.db.models import Max
|
||||
|
||||
import random
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from django import forms
|
||||
from django.forms.models import BaseInlineFormSet
|
||||
from bda.models import Spectacle, Participant, ChoixSpectacle, Attribution
|
||||
from bda.models import Spectacle
|
||||
|
||||
class BaseBdaFormSet(BaseInlineFormSet):
|
||||
def clean(self):
|
||||
|
|
|
@ -5,7 +5,6 @@ import calendar
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.db.models.signals import post_save
|
||||
from django.template import loader, Context
|
||||
from django.core import mail
|
||||
from django.conf import settings
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.conf.urls import include, url, patterns
|
||||
from bda import views
|
||||
from django.conf.urls import url, patterns
|
||||
from bda.views import SpectacleListView
|
||||
|
||||
urlpatterns = patterns('',
|
||||
|
|
19
bda/views.py
19
bda/views.py
|
@ -2,11 +2,9 @@
|
|||
|
||||
from __future__ import division
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.db import models
|
||||
from django.http import Http404
|
||||
from django.core import serializers
|
||||
from django.forms.models import inlineformset_factory
|
||||
import hashlib
|
||||
|
@ -19,9 +17,7 @@ from datetime import timedelta
|
|||
import time
|
||||
|
||||
from gestioncof.decorators import cof_required, buro_required
|
||||
from gestioncof.shared import send_custom_mail
|
||||
from bda.models import Spectacle, Participant, ChoixSpectacle, Attribution, \
|
||||
Tirage, render_template
|
||||
from bda.models import Spectacle, Participant, ChoixSpectacle, Attribution, Tirage
|
||||
from bda.algorithm import Algorithm
|
||||
|
||||
from bda.forms import BaseBdaFormSet, TokenForm, ResellForm
|
||||
|
@ -121,7 +117,6 @@ def places_ics(request, tirage_id):
|
|||
places_dict[place.spectacle] = place
|
||||
spectacles.append(place.spectacle)
|
||||
filtered_places.append(place)
|
||||
date = place.spectacle.date.date()
|
||||
return render(request, "resume_places.ics",
|
||||
{"participant": participant,
|
||||
"places": filtered_places}, content_type="text/calendar")
|
||||
|
@ -265,18 +260,6 @@ def do_resell(request, form):
|
|||
spectacle = form.cleaned_data["spectacle"]
|
||||
count = form.cleaned_data["count"]
|
||||
places = "2 places" if count == "2" else "une place"
|
||||
"""
|
||||
send_custom_mail("bda-revente@lists.ens.fr",
|
||||
"bda-revente",
|
||||
{"places": places,
|
||||
"spectacle": spectacle.title,
|
||||
"date": spectacle.date_no_seconds(),
|
||||
"lieu": spectacle.location,
|
||||
"prix": spectacle.price,
|
||||
"revendeur": request.user.get_full_name(),
|
||||
"revendeur_mail": request.user.email},
|
||||
from_email = request.user.email)
|
||||
"""
|
||||
mail = u"""Bonjour,
|
||||
|
||||
Je souhaite revendre %s pour %s le %s (%s) à %.02f€.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue