improved NoteFormMixin, added Appel model and form in 'suivi'

This commit is contained in:
Arthur Gerbaud
2016-08-17 17:39:24 +02:00
parent d940bc5b1c
commit 9812aa858c
11 changed files with 76 additions and 50 deletions

13
suivi/notes.py Normal file
View File

@@ -0,0 +1,13 @@
from django.db import models
from notes.models import Note
class Appel(Note):
entrant = models.BooleanField( "Appel entrant ?")
def save(self, **kwargs):
print('save', self)
return super().save(**kwargs)
def note_labels(self): return ["Reçu" if self.entrant else "Émis", self.created_by]
def note_bg_colors(self): return ("warning", "info")