Revision 1f724c01
Added by Benjamin Dauvergne over 13 years ago
| calebasse/personnel/forms.py | ||
|---|---|---|
|
from django.forms import ModelForm
|
||
|
|
||
|
from django.contrib.auth.models import User
|
||
|
from models import Personnel, CongeAnnuel
|
||
|
|
||
|
class CreateUserForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = User
|
||
|
|
||
|
|
||
|
class EditUserForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = User
|
||
|
|
||
|
class CreatePersonnelForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = Personnel
|
||
|
|
||
|
|
||
|
class EditPersonnelForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = Personnel
|
||
|
|
||
|
class CreateCongeAnnuelForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = CongeAnnuel
|
||
|
|
||
|
|
||
|
class EditCongeAnnuelForm(ModelForm):
|
||
|
class Meta:
|
||
|
model = CongeAnnuel
|
||
| calebasse/personnel/models.py | ||
|---|---|---|
|
from django.db import models
|
||
|
|
||
|
class Personnel(models.Model):
|
||
|
pass
|
||
|
|
||
|
class Conge(models.Model):
|
||
|
personne = models.ForeignKey(Personnel)
|
||
|
|
||
|
class CongeAnnuel(models.Model):
|
||
|
pass
|
||
| calebasse/personnel/templates/personnel/congeannuel_confirm_delete.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/congeannuel_edit.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/congeannuel_list.html | ||
|---|---|---|
|
{% extends "calebasse/base.html" %}
|
||
| calebasse/personnel/templates/personnel/congeannuel_nouveau.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/index.html | ||
|---|---|---|
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
<head>
|
||
|
<meta charset="utf-8"/>
|
||
|
<title>APS42 — Gestion des personnes</title>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/smoothness/jquery-ui-1.8.21.custom.css"/>
|
||
|
<script src="js/jquery-1.7.2.min.js"></script>
|
||
|
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||
|
<script>
|
||
|
$(function() {
|
||
|
$('#tabs').tabs();
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="wrap-large">
|
||
|
<div id="header">
|
||
|
<h1><a href="accueil.html">APS 42</a></h1>
|
||
|
<span>Gestion des personnes - CMPP</span>
|
||
|
</div>
|
||
|
<div id="splash" class="cmpp">
|
||
|
<div id="user-links">
|
||
|
<a href="connexion.html">Déconnexion</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="content">
|
||
|
|
||
|
<div id="appbar">
|
||
|
<h2>Gestion des personnes</h2>
|
||
|
<a href="accueil.html">Retourner à l'accueil</a>
|
||
|
</div>
|
||
|
|
||
|
<h3>Personnel</h3>
|
||
|
<ul>
|
||
|
<li><a href="acces.html">Accès</a></li>
|
||
|
<!-- gestion des accès à l'application, une liste de comptes + la
|
||
|
possibilité de les attacher à un membre du personnel -->
|
||
|
<li><a href="admin-personnel.html">Administration du personnel</a></li>
|
||
|
<li><a href="conges.html">Congés</a></li>
|
||
|
<!-- affiche les congés de tout le monde -->
|
||
|
<!-- + la possibilité de définir les congés annuels -->
|
||
|
<!-- "elle se sert d'un tableau avec les congés de tout le monde pour
|
||
|
savoir qui est présent sur le site dans les périodes creuses",
|
||
|
"que personne ne soit seul" -->
|
||
|
</ul>
|
||
|
<h3>Extérieurs</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="#">Intervenants extérieurs</a></li>
|
||
|
<li><a href="#">Médecins extérieurs</a></li>
|
||
|
<li><a href="#">Professeurs des écoles</a></li>
|
||
|
</ul>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
—
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
| calebasse/personnel/templates/personnel/personnel_confirm_delete.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/personnel_edit.html | ||
|---|---|---|
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
<head>
|
||
|
<meta charset="utf-8"/>
|
||
|
<title>APS42 — Gestion du personnel</title>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/smoothness/jquery-ui-1.8.21.custom.css"/>
|
||
|
|
||
|
<script src="js/jquery-1.7.2.min.js"></script>
|
||
|
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||
|
<script src="development-bundle/ui/i18n/jquery.ui.datepicker-fr.js"></script>
|
||
|
<script>
|
||
|
$(function() {
|
||
|
$('#lundi').click(function() {
|
||
|
$('#lundi-dlg').dialog({title: 'Plages du lundi',
|
||
|
width: '950px',
|
||
|
buttons: [ { text: "Annuler",
|
||
|
click: function() { $(this).dialog("close"); } },
|
||
|
{ text: "Valider",
|
||
|
click: function() { $(this).dialog("close"); } }]}
|
||
|
);
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="wrap-large">
|
||
|
<div id="header">
|
||
|
<h1><a href="accueil.html">APS 42</a></h1>
|
||
|
<span>Gestion - CMPP</span>
|
||
|
</div>
|
||
|
<div id="splash" class="cmpp">
|
||
|
<div id="user-links">
|
||
|
<a href="connexion.html">Déconnexion</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="content">
|
||
|
|
||
|
<div id="appbar">
|
||
|
<h2>Personnel - Durant François <span class="en-conge">(en congé jusqu'au 3 septembre)</span></h2>
|
||
|
<a href="admin-personnel.html">Retourner à l'administration du personnel</a>
|
||
|
<button>Supprimer</button>
|
||
|
</div>
|
||
|
|
||
|
<div id="info-membre">
|
||
|
<div class="frame">
|
||
|
<h3>État civil</h3>
|
||
|
<button class="save">✔</button>
|
||
|
<p><label>Nom :</label> <input value="Durant"/>
|
||
|
<label>Prénom(s) :</label> <input value="François"/>
|
||
|
<label>Genre :</label> <input value="M"/></p>
|
||
|
</div>
|
||
|
|
||
|
<div class="frame">
|
||
|
<h3>Services</h3>
|
||
|
<button class="save">✔</button>
|
||
|
|
||
|
<p class="services">
|
||
|
<input type="checkbox" checked="checked"><label>CMPP</label></input>
|
||
|
<input type="checkbox" checked="checked"><label>CAMSP</label></input>
|
||
|
<input type="checkbox"><label>SESSAD TED</label></input>
|
||
|
<input type="checkbox"><label>SESSAD DYS</label></input>
|
||
|
</p>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div class="frame" id="schedule">
|
||
|
<h3>Horaires de travail</h3>
|
||
|
|
||
|
<table>
|
||
|
<thead><tr><th id="lundi">Lundi</th><th>Mardi</th><th>Mercredi</th><th>Jeudi</th><th>Vendredi</th><th>Samedi</th><th>Dimanche</th></tr></thead>
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td>De 13h30 à 17h30</td>
|
||
|
<td>De 8h30 à 12h30<br/>De 13h30 à 17h30</td>
|
||
|
<td>-</td>
|
||
|
<td>De 8h30 à 12h30<br/>De 13h30 à 17h30</td>
|
||
|
<td>-</td>
|
||
|
<td>-</td>
|
||
|
<td>-</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="frame">
|
||
|
<h3>Congés</h3>
|
||
|
<button class="save">✍</button>
|
||
|
<ul>
|
||
|
<li>Du 20 août au 3 septembre 2012 (en cours)</li>
|
||
|
<li>Du 3 au 10 octobre 2012</li>
|
||
|
<li>Du 24 décembre 2012 au 4 janvier 2013 (congés annuels)</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
—
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="lundi-dlg" style="display: none;">
|
||
|
<table>
|
||
|
<tr>
|
||
|
<th>Heure début</th> <th>Heure fin</th> <th>Date début</th> <th>Date fin</th> <th>Périodicité</th> <th>Services</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><input value="13h30" size="8"/></td> <td><input value="17h30" size="8"/></td> <td><input value="20/04/2012" size="12"/></td> <td><input value="-" size="12"/></td> <td><select><option>Toutes les semaines</option></select></td> <td><select><option>CAMSP</option><option>CMPP</option><option>...</option><option>+</option></select></td> <td><button>-</button></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr class="expired"> <td>13h30</td> <td>15h30</td> <td>2/01/2012</td> <td>14/04/2012</td> <td>2× par mois</td> <td>CAMSP</td> <td><button>déver.</button> </tr>
|
||
|
</table>
|
||
|
<button>+</button>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
| calebasse/personnel/templates/personnel/personnel_list.html | ||
|---|---|---|
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
<head>
|
||
|
<meta charset="utf-8"/>
|
||
|
<title>APS42 — Gestion du personnel</title>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/smoothness/jquery-ui-1.8.21.custom.css"/>
|
||
|
|
||
|
<script src="js/jquery-1.7.2.min.js"></script>
|
||
|
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||
|
<script src="development-bundle/ui/i18n/jquery.ui.datepicker-fr.js"></script>
|
||
|
<script>
|
||
|
$(function() {
|
||
|
$('table#membres tr').click(function() {
|
||
|
window.location = 'un-membre.html';
|
||
|
});
|
||
|
$('#new-membre').click(function() {
|
||
|
$('#new-membre-dlg').dialog({title: 'Nouveau membre',
|
||
|
width: '500px',
|
||
|
buttons: [ { text: "Fermer",
|
||
|
click: function() { $(this).dialog("close"); } },
|
||
|
{ text: "Ajouter",
|
||
|
click: function() {
|
||
|
$(this).dialog("close"); } } ]
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="wrap-large">
|
||
|
<div id="header">
|
||
|
<h1><a href="accueil.html">APS 42</a></h1>
|
||
|
<span>Gestion - CMPP</span>
|
||
|
</div>
|
||
|
<div id="splash" class="cmpp">
|
||
|
<div id="user-links">
|
||
|
<a href="connexion.html">Déconnexion</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="content">
|
||
|
|
||
|
<div id="appbar">
|
||
|
<h2>Gestion des personnes</h2>
|
||
|
<a href="gestion-personnes.html">Retourner à la gestion des personnes</a>
|
||
|
|
||
|
<button id="new-membre">Nouveau membre</button>
|
||
|
<br/>
|
||
|
</div>
|
||
|
|
||
|
<div id="sidebar">
|
||
|
<div>
|
||
|
<h3>Rechercher dans les membres du personnel</h3>
|
||
|
<label>Nom : <input type="text"/></label>
|
||
|
<label>Prénom : <input type="text"/></label>
|
||
|
<label>Profession : <input type="text"/></label>
|
||
|
<button>Rechercher</button>
|
||
|
</div>
|
||
|
<div id="filtre">
|
||
|
<h3>Afficher les personnes</h3>
|
||
|
<ul>
|
||
|
<li><label><input checked="checked" class="therapeutes" type="checkbox"/>Thérapeutes</label></li>
|
||
|
<li><label><input checked="checked" class="non-therapeutes" type="checkbox"/>Non-thérapeutes</label></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="content">
|
||
|
<table id="membres" class="main">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Nom</th>
|
||
|
<th>Prénom</th>
|
||
|
<th>Profession</th>
|
||
|
<th>Services</th>
|
||
|
<th>En congé</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
|
||
|
<tr>
|
||
|
<td>Dupont</td>
|
||
|
<td>Gloria</td>
|
||
|
<td>Secrétaire</td>
|
||
|
<td>SESSAD TED</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>Durant</td>
|
||
|
<td>François</td>
|
||
|
<td>Neuropsychiatre</td>
|
||
|
<td>CMPP / CAMSP</td>
|
||
|
<td>×</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>Maurier</td>
|
||
|
<td>Stéphanie</td>
|
||
|
<td>Généraliste</td>
|
||
|
<td>CMPP</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>Hosseini</td>
|
||
|
<td>Marcus</td>
|
||
|
<td>Généraliste</td>
|
||
|
<td>CAMSP</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
—
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="new-membre-dlg" style="display: none;">
|
||
|
<form>
|
||
|
<p>
|
||
|
<label for="id_nom">Nom :</label>
|
||
|
<input id="id_nom" type="text" name="nom"/>
|
||
|
</p>
|
||
|
<p>
|
||
|
<label for="id_prenom">Prénom :</label>
|
||
|
<input id="id_prenom" type="text" name="prenom"/>
|
||
|
</p>
|
||
|
</form>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|
||
| calebasse/personnel/templates/personnel/personnel_nouveau.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/user_confirm_delete.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/user_edit.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/templates/personnel/user_list.html | ||
|---|---|---|
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
<head>
|
||
|
<meta charset="utf-8"/>
|
||
|
<title>APS42 — Accès</title>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
|
||
|
<link rel="stylesheet" type="text/css" media="all" href="css/smoothness/jquery-ui-1.8.21.custom.css"/>
|
||
|
|
||
|
<script src="js/jquery-1.7.2.min.js"></script>
|
||
|
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||
|
<script src="development-bundle/ui/i18n/jquery.ui.datepicker-fr.js"></script>
|
||
|
<script>
|
||
|
$(function() {
|
||
|
$('#new-membre').click(function() {
|
||
|
$('#new-membre-dlg').dialog({title: 'Nouvel accès',
|
||
|
width: '300px',
|
||
|
buttons: [ { text: "Fermer",
|
||
|
click: function() { $(this).dialog("close"); } },
|
||
|
{ text: "Ajouter",
|
||
|
click: function() {
|
||
|
$(this).dialog("close"); } } ]
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="wrap-large">
|
||
|
<div id="header">
|
||
|
<h1><a href="accueil.html">APS 42</a></h1>
|
||
|
<span>Gestion - CMPP</span>
|
||
|
</div>
|
||
|
<div id="splash" class="cmpp">
|
||
|
<div id="user-links">
|
||
|
<a href="connexion.html">Déconnexion</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="content">
|
||
|
|
||
|
<div id="appbar">
|
||
|
<h2>Gestion des personnes — Accès</h2>
|
||
|
<a href="gestion-personnes.html">Retourner à la gestion des personnes</a>
|
||
|
|
||
|
<button id="new-membre">Nouvel accès</button>
|
||
|
<br/>
|
||
|
</div>
|
||
|
|
||
|
<div id="sidebar">
|
||
|
<div>
|
||
|
<h3>Rechercher dans les comptes</h3>
|
||
|
<label>Identifiant : <input type="text"/></label>
|
||
|
<button>Rechercher</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="content">
|
||
|
<table class="main">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Identifiant</th>
|
||
|
<th>Courriel</th>
|
||
|
<th>Fiche Personnel</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
|
||
|
<tr>
|
||
|
<td>fdurant</td>
|
||
|
<td>fdurant@example.com</td>
|
||
|
<td><a href="un-membre.html">Durant François</a>
|
||
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>smaurier</td>
|
||
|
<td>smaurier@example.com</td>
|
||
|
<td><a href="#">Maurier Stéphanie</a></td>
|
||
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>mhosseini</td>
|
||
|
<td>mhosseini@example.com</td>
|
||
|
<td><a href="#">Hosseini Marcus</a></td>
|
||
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>mates</td>
|
||
|
<td>mates@entrouvert.com</td>
|
||
|
<td>-</td>
|
||
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
||
|
</tr>
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
<h4>Comptes déactivés</h4>
|
||
|
|
||
|
<table class="main">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Identifiant</th>
|
||
|
<th>Courriel</th>
|
||
|
<th>Fiche Personnel</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
|
||
|
<tr>
|
||
|
<td>gdupont</td>
|
||
|
<td>gdupont@example.com</td>
|
||
|
<td><a href="#">Dupont Gloria</a></td>
|
||
|
<td><button>⎅</button> <button>+</button> <button>Histo</button></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
—
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="new-membre-dlg" style="display: none;">
|
||
|
<form>
|
||
|
<p>
|
||
|
<label for="id_nom">Identifiant :</label>
|
||
|
<input id="id_nom" type="text" name="nom"/>
|
||
|
</p>
|
||
|
<p>
|
||
|
<label for="id_password">Mot de passe :</label>
|
||
|
<input id="id_password" type="text" name="password"/>
|
||
|
</p>
|
||
|
<p>
|
||
|
<label for="id_member">Membre du personnel associé :</label>
|
||
|
<select id="id_member" name="member">
|
||
|
<option>aucun</option>
|
||
|
<option>Bob Leponge</option>
|
||
|
<option>...</option>
|
||
|
</select>
|
||
|
</p>
|
||
|
</form>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|
||
| calebasse/personnel/templates/personnel/user_nouveau.html | ||
|---|---|---|
|
{% extends "calebasse/popup.html %}
|
||
| calebasse/personnel/tests.py | ||
|---|---|---|
|
"""
|
||
|
This file demonstrates writing tests using the unittest module. These will pass
|
||
|
when you run "manage.py test".
|
||
|
|
||
|
Replace this with more appropriate tests for your application.
|
||
|
"""
|
||
|
|
||
|
from django.test import TestCase
|
||
|
|
||
|
|
||
|
class SimpleTest(TestCase):
|
||
|
def test_basic_addition(self):
|
||
|
"""
|
||
|
Tests that 1 + 1 always equals 2.
|
||
|
"""
|
||
|
self.assertEqual(1 + 1, 2)
|
||
| calebasse/personnel/urls.py | ||
|---|---|---|
|
from django.conf.urls import patterns, url, include
|
||
|
from django.views.generic.base import TemplateView
|
||
|
from django.views.generic.list import ListView
|
||
|
from django.views.generic.edit import CreateView, DeleteView, UpdateView
|
||
|
|
||
|
from django.contrib.auth.models import User
|
||
|
from models import Personnel, CongeAnnuel, Conge
|
||
|
from forms import CreateUserForm, EditUserForm
|
||
|
from forms import CreatePersonnelForm, EditPersonnelForm
|
||
|
from forms import CreateCongeAnnuelForm, EditCongeAnnuelForm
|
||
|
|
||
|
acces_patterns = patterns('',
|
||
|
url(r'^$', ListView.as_view(model=User)),
|
||
|
url(r'^nouveau/$', CreateView.as_view(model=User,
|
||
|
form_class=CreateUserForm,
|
||
|
template_name_suffix='_nouveau.html')),
|
||
|
url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=User,
|
||
|
form_class=EditUserForm,
|
||
|
template_name_suffix='_edit.html')),
|
||
|
url(r'^(?P<pk>\d+)/supprimer/$', DeleteView.as_view(model=User)),
|
||
|
)
|
||
|
|
||
|
|
||
|
personne_patterns = patterns('',
|
||
|
url(r'^$', ListView.as_view(model=Personnel)),
|
||
|
url(r'^nouveau/$', CreateView.as_view(model=Personnel,
|
||
|
form_class=CreatePersonnelForm,
|
||
|
template_name_suffix='_nouveau.html')),
|
||
|
url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=Personnel,
|
||
|
form_class=EditPersonnelForm,
|
||
|
template_name_suffix='_edit.html')),
|
||
|
url(r'^(?P<pk>\d+)/supprimer/$', DeleteView.as_view(model=Personnel)),
|
||
|
)
|
||
|
|
||
|
|
||
|
conges_annuels_patterns = patterns('',
|
||
|
url(r'^$', ListView.as_view(model=CongeAnnuel)),
|
||
|
url(r'^nouveau/$', CreateView.as_view(model=CongeAnnuel,
|
||
|
form_class=CreateCongeAnnuelForm,
|
||
|
template_name_suffix='_nouveau.html')),
|
||
|
url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=CongeAnnuel,
|
||
|
form_class=EditCongeAnnuelForm,
|
||
|
template_name_suffix='_edit.html')),
|
||
|
url(r'^(?P<pk>\d+)/supprimer/$', DeleteView.as_view(model=CongeAnnuel)),
|
||
|
)
|
||
|
|
||
|
|
||
|
conges_patterns = patterns('',
|
||
|
url(r'^$', ListView.as_view(model=Conge)),
|
||
|
url(r'^conges-annuels/', include(conges_annuels_patterns)),
|
||
|
)
|
||
|
|
||
|
|
||
|
urlpatterns = patterns('',
|
||
|
url(r'^$', TemplateView.as_view(template_name='personnel/index.html')),
|
||
|
url(r'^acces/', include(acces_patterns)),
|
||
|
url(r'^gestion/', include(personne_patterns)),
|
||
|
url(r'^conges/', include(personne_patterns)),
|
||
|
)
|
||
| calebasse/personnel/views.py | ||
|---|---|---|
|
# Create your views here.
|
||
Also available in: Unified diff
new application "personnel"