summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-05-04 09:17:59 +0000
committerGuillaume Seguin <guillaume@segu.in>2008-05-04 09:17:59 +0000
commit1c9da9b08a66c67f69bad55e7067a02e6892b23f (patch)
treebacc634bb7d8e6e6212d1c4a3b3fd9c81e68fe83
parenta94e5f15a830ef08299a5f32386ae130b3050b55 (diff)
downloadstocktrader-1c9da9b08a66c67f69bad55e7067a02e6892b23f.tar.gz
stocktrader-1c9da9b08a66c67f69bad55e7067a02e6892b23f.tar.bz2
* Add creation date field to StockTeam model and enable admin for it
-rw-r--r--main/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index 93dc5ca..8674ffb 100644
--- a/main/models.py
+++ b/main/models.py
@@ -343,6 +343,11 @@ class StockTeam (models.Model):
name = models.CharField (_("Team name"), max_length = 6)
founder = models.ForeignKey ('StockPlayer', unique = True,
verbose_name = _("Founder"))
+ created = models.DateTimeField (_("Creation date"), auto_now_add = True)
+
+ class Admin:
+ list_display = ('name', 'founder', 'created',)
+ ordering = ('created',)
class StockPlayer (models.Model):
'''Player object'''