remove pytz
This commit is contained in:
@@ -7,7 +7,6 @@ import smtplib
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
import requests
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
@@ -226,7 +225,7 @@ class DashboardInfoAPI(APIView):
|
||||
def get(self, request):
|
||||
today = datetime.today()
|
||||
today_submission_count = Submission.objects.filter(
|
||||
create_time__gte=datetime(today.year, today.month, today.day, 0, 0, tzinfo=pytz.UTC)).count()
|
||||
create_time__gte=datetime(today.year, today.month, today.day, 0, 0)).count()
|
||||
recent_contest_count = Contest.objects.exclude(end_time__lt=timezone.now()).count()
|
||||
judge_server_count = len(list(filter(lambda x: x.status == "normal", JudgeServer.objects.all())))
|
||||
return self.success({
|
||||
|
||||
Reference in New Issue
Block a user