forked from DGNum/gestioCOF
created_at required with default
This commit is contained in:
parent
e2d7192b23
commit
4b2e20e728
2 changed files with 21 additions and 1 deletions
20
kfet/migrations/0053_created_at.py
Normal file
20
kfet/migrations/0053_created_at.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('kfet', '0052_category_addcost'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='created_at',
|
||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
||||
),
|
||||
]
|
|
@ -41,7 +41,7 @@ class Account(models.Model):
|
|||
max_digits = 6, decimal_places = 2,
|
||||
default = 0)
|
||||
is_frozen = models.BooleanField("est gelé", default = False)
|
||||
created_at = models.DateTimeField(auto_now_add = True, null = True)
|
||||
created_at = models.DateTimeField(default=timezone.now)
|
||||
# Optional
|
||||
PROMO_CHOICES = [(r,r) for r in range(1980, date.today().year+1)]
|
||||
promo = models.IntegerField(
|
||||
|
|
Loading…
Reference in a new issue