[damned-lies] auto_now and auto_now_add are mutually exclusive



commit f591528c0026a79d3753b81c90d654af2c576ba8
Author: Claude Paroz <claude 2xlibre net>
Date:   Wed Sep 9 15:59:52 2015 +0200

    auto_now and auto_now_add are mutually exclusive

 vertimus/models.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vertimus/models.py b/vertimus/models.py
index 4920efd..8283174 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -56,7 +56,7 @@ class State(models.Model):
     person = models.ForeignKey(Person, default=None, null=True)
 
     name = models.SlugField(max_length=20, default='None')
-    updated = models.DateTimeField(auto_now=True, auto_now_add=True, editable=False)
+    updated = models.DateTimeField(auto_now=True, editable=False)
 
     class Meta:
         db_table = 'state'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]