Revision 0a82dcb8
Added by Benjamin Dauvergne over 12 years ago
calebasse/agenda/views.py | ||
---|---|---|
7 | 7 |
from calebasse.personnes.models import Worker |
8 | 8 |
from calebasse.ressources.models import WorkerType |
9 | 9 |
|
10 |
from forms import NewAppointmentForm |
|
11 |
|
|
10 | 12 |
def redirect_today(request, service): |
11 | 13 |
'''If not date is given we redirect on the agenda for today''' |
12 | 14 |
return redirect('agenda', date=datetime.date.today().strftime('%Y-%m-%d'), |
... | ... | |
21 | 23 |
context['workers_types'] = [] |
22 | 24 |
context['workers_agenda'] = [] |
23 | 25 |
context['disponnibility'] = {} |
26 |
context['new_appointment_form'] = NewAppointmentForm() |
|
24 | 27 |
workers = [] |
25 | 28 |
for worker_type in WorkerType.objects.all(): |
26 | 29 |
data = {'type': worker_type.name, 'workers': Worker.objects.for_service(self.service, worker_type) } |
... | ... | |
33 | 36 |
|
34 | 37 |
context['disponnibility'] = Occurrence.objects.daily_disponiblity(context['date'], workers) |
35 | 38 |
return context |
39 |
|
|
40 |
def new_appointment(request): |
|
41 |
pass |
Also available in: Unified diff
add a new appointment form