projets
/
ongolaboy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0fa503
)
TODO done
author
Willy MANGA
<willy.manga@auf.org>
Fri, 15 Apr 2011 10:42:17 +0000
(11:42 +0100)
committer
Willy MANGA
<willy.manga@auf.org>
Fri, 15 Apr 2011 10:42:17 +0000
(11:42 +0100)
On retourne le nom et la date de la souscription
auf-cnf-usager/info/usager/models.py
patch
|
blob
|
blame
|
history
diff --git
a/auf-cnf-usager/info/usager/models.py
b/auf-cnf-usager/info/usager/models.py
index
43950cc
..
5f620a0
100644
(file)
--- a/
auf-cnf-usager/info/usager/models.py
+++ b/
auf-cnf-usager/info/usager/models.py
@@
-82,6
+82,9
@@
class Souscription(models.Model):
code_service = models.ForeignKey(Services)
date_souscription = models.DateField()
-#TODO : je cherche à définir ce qu'il faut exactement retourner :(
-# def __unicode__(self):
-# return ????
+ def __unicode__(self):
+ annee_souscription = self.date_souscription.year
+ mois_souscription = self.date_souscription.month
+ jour_souscription = self.date_souscription.day
+ return "%s le %s/%s/%s" % (self.nom_abonne,
+ jour_souscription,mois_souscription,annee_souscription)