Ajout champ création sur modèle Account

This commit is contained in:
Aurélien Delobelle 2016-09-05 13:59:14 +02:00
parent 1125b553d0
commit 16fe7eb994
2 changed files with 20 additions and 0 deletions

View file

@ -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),
),
]

View file

@ -40,6 +40,7 @@ class Account(models.Model):
max_digits = 6, decimal_places = 2, max_digits = 6, decimal_places = 2,
default = 0) default = 0)
is_frozen = models.BooleanField(default = False) is_frozen = models.BooleanField(default = False)
created_at = models.DateTimeField(auto_now_add = True, null = True)
# Optional # Optional
PROMO_CHOICES = [(r,r) for r in range(1980, date.today().year+1)] PROMO_CHOICES = [(r,r) for r in range(1980, date.today().year+1)]
promo = models.IntegerField( promo = models.IntegerField(