Project

General

Profile

« Previous | Next » 

Revision 6c1bf4ad

Added by Jérôme Schneider over 11 years ago

personnes: manage external therapists and workers

View differences:

calebasse/personnes/forms.py
7 7

  
8 8
from calebasse.ressources.models import WorkerType, Service, HolidayType
9 9

  
10
from models import Worker, UserWorker, TimeTable, Holiday
10
from models import Worker, UserWorker, TimeTable, Holiday, ExternalTherapist, ExternalWorker
11 11

  
12 12

  
13 13
class UserForm(forms.ModelForm):
calebasse/personnes/templates/personnes/index.html
15 15

  
16 16
    <h3>Extérieurs</h3>
17 17
    <ul>
18
     <li><a href="intervenants-exterieurs/">Intervenants extérieurs</a></li>
19
     <li><a href="medecins-exterieurs/">Médecins extérieurs</a></li>
18
     <li><a href="externalworker/">Intervenants extérieurs</a></li>
19
     <li><a href="externaltherapist/">Médecins extérieurs</a></li>
20 20
    </ul>
21 21
{% endblock %}
calebasse/personnes/urls.py
1 1
from django.conf.urls import patterns, url, include
2
from calebasse.ressources.urls import ressource_patterns
2 3

  
3 4

  
4 5
user_patterns = patterns('calebasse.personnes.views',
......
27 28
    url(r'^acces/', include(user_patterns)),
28 29
    url(r'^gestion/', include(worker_patterns)),
29 30
    url(r'^conges/', include(holidays_patterns)),
31
    url(r'^(?P<model_name>[a-z-]*)/', include(ressource_patterns)),
30 32
    )
calebasse/ressources/views.py
16 16
        _models = models.get_models()
17 17
    for model in _models:
18 18
        meta = model._meta
19
        if meta.module_name == model_name and meta.app_label == 'ressources':
19
        if meta.module_name == model_name and \
20
                (meta.app_label == 'ressources' or meta.app_label == 'personnes'):
20 21
            return model
21 22
    return None
22 23

  
23 24

  
24 25
def homepage(request, service):
25 26
    global _models
26
    print 'repr:', repr(service)
27 27
    if _models is None:
28 28
        _models = models.get_models()
29 29
    ressources_models = [

Also available in: Unified diff