Ajout champ création sur modèle Account
This commit is contained in:
parent
1125b553d0
commit
16fe7eb994
2 changed files with 20 additions and 0 deletions
19
kfet/migrations/0046_account_created_at.py
Normal file
19
kfet/migrations/0046_account_created_at.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue