handle timezones in petits_cours_views
This commit is contained in:
parent
1663a03a33
commit
80f1514d39
1 changed files with 2 additions and 2 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",
|
||||||
|
|
Loading…
Reference in a new issue