handle timezones in petits_cours_views

This commit is contained in:
Martin Pépin 2017-02-23 18:35:04 +01:00
parent 1663a03a33
commit 80f1514d39

View file

@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import json
from datetime import datetime
from custommail.shortcuts import render_custom_mail
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.contrib.auth.decorators import login_required
from django.contrib import messages
from django.utils import timezone
from .models import CofProfile
from .petits_cours_models import (
@ -279,7 +279,7 @@ def _traitement_post(request, demande):
unlock_tables()
demande.traitee = True
demande.traitee_par = request.user
demande.processed = datetime.now()
demande.processed = timezone.now()
demande.save()
return render(request,
"cof/traitement_demande_petit_cours_success.html",