Merge branch 'Kerl/datetime_warnings' into supportBDS
This commit is contained in:
commit
e1713a1d4f
5 changed files with 18 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
|
||||||
from custommail.shortcuts import render_custom_mail
|
from custommail.shortcuts import render_custom_mail
|
||||||
|
|
||||||
from django.shortcuts import render, get_object_or_404, redirect
|
from django.shortcuts import render, get_object_or_404, redirect
|
||||||
|
@ -12,6 +11,7 @@ from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
from django.utils import timezone
|
||||||
|
|
||||||
from .models import CofProfile
|
from .models import CofProfile
|
||||||
from .petits_cours_models import (
|
from .petits_cours_models import (
|
||||||
|
@ -279,7 +279,7 @@ def _traitement_post(request, demande):
|
||||||
unlock_tables()
|
unlock_tables()
|
||||||
demande.traitee = True
|
demande.traitee = True
|
||||||
demande.traitee_par = request.user
|
demande.traitee_par = request.user
|
||||||
demande.processed = datetime.now()
|
demande.processed = timezone.now()
|
||||||
demande.save()
|
demande.save()
|
||||||
return render(request,
|
return render(request,
|
||||||
"cof/traitement_demande_petit_cours_success.html",
|
"cof/traitement_demande_petit_cours_success.html",
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import unicode_literals
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import django.core.validators
|
import django.core.validators
|
||||||
import datetime
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -31,7 +31,7 @@ class Migration(migrations.Migration):
|
||||||
name='AccountNegative',
|
name='AccountNegative',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('start', models.DateTimeField(default=datetime.datetime(2016, 8, 2, 10, 22, 1, 569492))),
|
('start', models.DateTimeField(default=timezone.datetime(2016, 8, 2, 10, 22, 1, 569492, tzinfo=timezone.get_default_timezone()))),
|
||||||
('balance_offset', models.DecimalField(decimal_places=2, max_digits=6)),
|
('balance_offset', models.DecimalField(decimal_places=2, max_digits=6)),
|
||||||
('authorized_overdraft', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
|
('authorized_overdraft', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
|
||||||
('comment', models.CharField(max_length=255, blank=True)),
|
('comment', models.CharField(max_length=255, blank=True)),
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
import datetime
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -19,6 +19,11 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='accountnegative',
|
model_name='accountnegative',
|
||||||
name='start',
|
name='start',
|
||||||
field=models.DateTimeField(default=datetime.datetime(2016, 8, 2, 21, 39, 30, 52279)),
|
field=models.DateTimeField(
|
||||||
|
default=timezone.datetime(
|
||||||
|
2016, 8, 2, 21, 39, 30, 52279,
|
||||||
|
tzinfo=timezone.get_default_timezone()
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
import datetime
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -15,6 +15,6 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='accountnegative',
|
model_name='accountnegative',
|
||||||
name='start',
|
name='start',
|
||||||
field=models.DateTimeField(default=datetime.datetime.now),
|
field=models.DateTimeField(default=timezone.now),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
import datetime
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -15,6 +15,9 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='accountnegative',
|
model_name='accountnegative',
|
||||||
name='start',
|
name='start',
|
||||||
field=models.DateTimeField(default=datetime.datetime.now, blank=True, null=True),
|
field=models.DateTimeField(
|
||||||
|
default=timezone.now,
|
||||||
|
blank=True, null=True
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue