From 16fe7eb99494aea03de7dc17deaabec489bb02e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Mon, 5 Sep 2016 13:59:14 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20champ=20cr=C3=A9ation=20sur=20mod=C3=A8?= =?UTF-8?q?le=20Account?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/migrations/0046_account_created_at.py | 19 +++++++++++++++++++ kfet/models.py | 1 + 2 files changed, 20 insertions(+) create mode 100644 kfet/migrations/0046_account_created_at.py diff --git a/kfet/migrations/0046_account_created_at.py b/kfet/migrations/0046_account_created_at.py new file mode 100644 index 00000000..a624c0fb --- /dev/null +++ b/kfet/migrations/0046_account_created_at.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('kfet', '0045_auto_20160905_0705'), + ] + + operations = [ + migrations.AddField( + model_name='account', + name='created_at', + field=models.DateTimeField(auto_now_add=True, null=True), + ), + ] diff --git a/kfet/models.py b/kfet/models.py index 6a6807aa..f1eb2fca 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -40,6 +40,7 @@ class Account(models.Model): max_digits = 6, decimal_places = 2, default = 0) is_frozen = models.BooleanField(default = False) + created_at = models.DateTimeField(auto_now_add = True, null = True) # Optional PROMO_CHOICES = [(r,r) for r in range(1980, date.today().year+1)] promo = models.IntegerField(