From 138ce7fc99a1bf105995d89f64711feb11e4ae08 Mon Sep 17 00:00:00 2001 From: int-y1 Date: Fri, 25 Aug 2023 21:39:37 -0400 Subject: [PATCH] Improve import locations --- judge/admin/interface.py | 3 ++- judge/highlight_code.py | 3 ++- judge/views/contests.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/judge/admin/interface.py b/judge/admin/interface.py index c3745097b7..eac8f7176a 100644 --- a/judge/admin/interface.py +++ b/judge/admin/interface.py @@ -1,6 +1,7 @@ from django.contrib import admin from django.contrib.auth.models import User -from django.contrib.flatpages.admin import FlatPageAdmin as OldFlatPageAdmin, FlatpageForm as OldFlatpageForm +from django.contrib.flatpages.admin import FlatPageAdmin as OldFlatPageAdmin +from django.contrib.flatpages.forms import FlatpageForm as OldFlatpageForm from django.forms import ModelForm from django.urls import NoReverseMatch, reverse, reverse_lazy from django.utils.html import format_html diff --git a/judge/highlight_code.py b/judge/highlight_code.py index a37572a6d3..06a947ed97 100644 --- a/judge/highlight_code.py +++ b/judge/highlight_code.py @@ -1,4 +1,5 @@ -from django.utils.html import format_html, mark_safe +from django.utils.html import format_html +from django.utils.safestring import mark_safe __all__ = ['highlight_code'] diff --git a/judge/views/contests.py b/judge/views/contests.py index 6fd117785a..5ae7428fe8 100644 --- a/judge/views/contests.py +++ b/judge/views/contests.py @@ -23,8 +23,8 @@ from django.utils.safestring import mark_safe from django.utils.timezone import make_aware from django.utils.translation import gettext as _, gettext_lazy -from django.views.generic import ListView, TemplateView -from django.views.generic.detail import DetailView, SingleObjectMixin, View +from django.views.generic import ListView, TemplateView, View +from django.views.generic.detail import DetailView, SingleObjectMixin from django.views.generic.list import BaseListView from icalendar import Calendar as ICalendar, Event from reversion import revisions