Revision 76974b6f
Added by Benjamin Dauvergne almost 12 years ago
calebasse/api.py | ||
---|---|---|
1 | 1 |
|
2 | 2 |
from tastypie.authorization import DjangoAuthorization |
3 | 3 |
from tastypie.resources import ModelResource |
4 |
from calebasse.agenda.models import Event, Occurrence
|
|
4 |
from calebasse.agenda.models import Event |
|
5 | 5 |
from calebasse.dossiers.models import PatientRecord, PatientAddress |
6 | 6 |
|
7 | 7 |
|
... | ... | |
11 | 11 |
resource_name = 'event' |
12 | 12 |
authorization = DjangoAuthorization() |
13 | 13 |
|
14 |
class OccurrenceResource(ModelResource): |
|
15 |
class Meta: |
|
16 |
queryset = Occurrence.objects.all() |
|
17 |
resource_name = 'occurrence' |
|
18 |
authorization = DjangoAuthorization() |
|
19 |
|
|
20 | 14 |
class PatientRecordRessource(ModelResource): |
21 | 15 |
class Meta: |
22 | 16 |
queryset = PatientRecord.objects.all() |
... | ... | |
31 | 25 |
|
32 | 26 |
patientaddress_ressource = PatientAddressRessource() |
33 | 27 |
event_resource = EventResource() |
34 |
occurrence_resource = OccurrenceResource() |
|
35 | 28 |
patientrecord_resource = PatientRecordRessource() |
36 | 29 |
|
Also available in: Unified diff
agenda/actes/dossiers: move Occurence fields into Event, add recurring events support