Browse Source

Model: add creation and modification date to common fields

ArnAud 9 years ago
parent
commit
fbd970a070
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      EditorialModel/classtypes.py

+ 11
- 0
EditorialModel/classtypes.py View File

@@ -19,6 +19,17 @@ common_fields = {
19 19
         'max_length': 128,
20 20
         'internal': 'automatic',
21 21
     },
22
+    'creation_date': {
23
+        'fieldtype': 'datetime',
24
+        'now_on_create': True,
25
+        'internal': 'automatic',
26
+    },
27
+    'modification_date': {
28
+        'fieldtype': 'datetime',
29
+        'now_on_create': True,
30
+        'now_on_update': True,
31
+        'internal': 'automatic',
32
+    }
22 33
 }
23 34
 
24 35
 

Loading…
Cancel
Save