M impersonate/middleware.py +1 -2
@@ 1,9 1,8 @@
# -*- coding: utf-8 -*-
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from django.http import HttpResponseNotAllowed
from django.shortcuts import redirect, reverse
-from django.utils import timezone
from django.utils.deprecation import MiddlewareMixin
from django.utils.functional import SimpleLazyObject
M impersonate/views.py +1 -2
@@ 1,11 1,10 @@
# -*- coding: utf-8 -*-
import logging
-from datetime import datetime
+from datetime import datetime, timezone
from django.db.models import Q
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect, render
-from django.utils import timezone
from .decorators import allowed_user_required
from .helpers import (