[damned-lies] Fix 'created' datetime in ActionDbArchived and 'updated' in StateDb
- From: Stéphane Raimbault <stephaner src gnome org>
- To: svn-commits-list gnome org
- Subject: [damned-lies] Fix 'created' datetime in ActionDbArchived and 'updated' in StateDb
- Date: Sat, 23 May 2009 10:58:53 -0400 (EDT)
commit 86cf871815363231abd39f96155fefd712cfe1b3
Author: Stéphane Raimbault <stephane raimbault gmail com>
Date: Sat May 23 16:54:44 2009 +0200
Fix 'created' datetime in ActionDbArchived and 'updated' in StateDb
---
vertimus/models.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/vertimus/models.py b/vertimus/models.py
index 6ef7e15..87e4807 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -20,7 +20,6 @@
import os, sys
-from datetime import datetime
from django.db import models
from django.utils.translation import get_language, activate, ugettext, ugettext_lazy as _
from django.core import mail, urlresolvers
@@ -49,7 +48,7 @@ class StateDb(models.Model):
person = models.ForeignKey(Person, default=None, null=True)
name = models.SlugField(max_length=20, default='None')
- updated = models.DateTimeField(default=datetime.now, editable=False, auto_now=True)
+ updated = models.DateTimeField(auto_now=True, auto_now_add=True, editable=False)
class Meta:
db_table = 'state'
@@ -674,7 +673,8 @@ class ActionDbArchived(models.Model):
person = models.ForeignKey(Person)
name = models.SlugField(max_length=8)
- created = models.DateTimeField(auto_now_add=True, editable=False)
+ # Datetime copied from ActionDb
+ created = models.DateTimeField(editable=False)
comment = models.TextField(blank=True, null=True)
file = models.FileField(upload_to=generate_archive_filename, blank=True, null=True)
sequence = models.IntegerField(blank=True, null=True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]