diff --git a/analytics/apps.py b/analytics/apps.py index 784d5a3..9275240 100644 --- a/analytics/apps.py +++ b/analytics/apps.py @@ -1,4 +1,5 @@ """Analytics Application configuration""" + from django.apps import AppConfig diff --git a/analytics/models.py b/analytics/models.py index c3f7337..d5def61 100644 --- a/analytics/models.py +++ b/analytics/models.py @@ -1,4 +1,5 @@ """Analytics models""" + from django.db.models import Model, CharField, IntegerField, DateField, ForeignKey, CASCADE from django.utils.translation import gettext_lazy as _ diff --git a/analytics/urls.py b/analytics/urls.py index a1cb2df..da71566 100644 --- a/analytics/urls.py +++ b/analytics/urls.py @@ -1,4 +1,5 @@ """Analytics URLs configuration""" + from django.urls import path from analytics.views import AnalyticsShowView, AnalyticsRestView diff --git a/analytics/views.py b/analytics/views.py index 3f44b7b..40e02cf 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -1,4 +1,5 @@ """Analytics views""" + from datetime import datetime, timedelta from django.contrib.auth.decorators import login_required diff --git a/backend/admin.py b/backend/admin.py index b85f1f6..d152b70 100644 --- a/backend/admin.py +++ b/backend/admin.py @@ -1,4 +1,5 @@ """Backend Admin pages""" + from django.contrib import admin from backend.forms import AdminSongForm diff --git a/backend/apps.py b/backend/apps.py index b38e2ec..abde257 100644 --- a/backend/apps.py +++ b/backend/apps.py @@ -1,4 +1,5 @@ """Backend app""" + from django.apps import AppConfig diff --git a/backend/forms.py b/backend/forms.py index 506077d..befdf0e 100644 --- a/backend/forms.py +++ b/backend/forms.py @@ -1,4 +1,5 @@ """Forms for backend app""" + from django.forms import ModelForm, ModelMultipleChoiceField, CheckboxSelectMultiple from backend.models import Song diff --git a/backend/management/commands/clear_prerender.py b/backend/management/commands/clear_prerender.py index faea23d..fc48630 100644 --- a/backend/management/commands/clear_prerender.py +++ b/backend/management/commands/clear_prerender.py @@ -1,4 +1,5 @@ """Clear prerender command""" + from django.core.management import BaseCommand from backend.models import Song diff --git a/backend/management/commands/import.py b/backend/management/commands/import.py index 6af5790..1662aab 100644 --- a/backend/management/commands/import.py +++ b/backend/management/commands/import.py @@ -1,4 +1,5 @@ """Management command for importing Songs""" + import json import logging from argparse import ArgumentParser diff --git a/backend/management/commands/prerender.py b/backend/management/commands/prerender.py index ac2919d..f7e8dac 100644 --- a/backend/management/commands/prerender.py +++ b/backend/management/commands/prerender.py @@ -1,4 +1,5 @@ """Prerender command""" + from django.core.management import BaseCommand from backend.models import Song diff --git a/backend/menus.py b/backend/menus.py index 5e1998b..5662ba5 100644 --- a/backend/menus.py +++ b/backend/menus.py @@ -1,4 +1,5 @@ """Menus for backend app""" + from django.urls import reverse from django.utils.translation import gettext_noop as _ from menu import MenuItem, Menu diff --git a/backend/middleware/__init__.py b/backend/middleware/__init__.py index d857d42..68271d9 100644 --- a/backend/middleware/__init__.py +++ b/backend/middleware/__init__.py @@ -1,3 +1,4 @@ """Middleware""" + from .cache import DisableClientSideCachingMiddleware from .settings import SiteNameMiddleware diff --git a/backend/middleware/cache.py b/backend/middleware/cache.py index 8ae73f3..9b9a617 100644 --- a/backend/middleware/cache.py +++ b/backend/middleware/cache.py @@ -1,4 +1,5 @@ """Middlewares for cache manipulation""" + from django.utils.cache import add_never_cache_headers diff --git a/backend/middleware/settings.py b/backend/middleware/settings.py index 9577a88..696600c 100644 --- a/backend/middleware/settings.py +++ b/backend/middleware/settings.py @@ -1,4 +1,5 @@ """Middleware containing forwarding variables from settings to templates""" + from django.conf import settings diff --git a/backend/mixins.py b/backend/mixins.py index 65f3b93..7b79f4d 100644 --- a/backend/mixins.py +++ b/backend/mixins.py @@ -1,4 +1,5 @@ """General mixins""" + from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from backend.auth import is_localadmin, is_superadmin diff --git a/backend/models.py b/backend/models.py index 38c826c..a323b6d 100644 --- a/backend/models.py +++ b/backend/models.py @@ -1,4 +1,5 @@ """Models for backend app""" + from django.conf import settings from django.db.models import ( Model, diff --git a/backend/templatetags/utils.py b/backend/templatetags/utils.py index 233bda7..66f1374 100644 --- a/backend/templatetags/utils.py +++ b/backend/templatetags/utils.py @@ -1,4 +1,5 @@ """Tags for drawing the menu""" + from django import template from django.template.defaultfilters import stringfilter from django.templatetags.static import static diff --git a/backend/urls.py b/backend/urls.py index c550d0f..a94e515 100644 --- a/backend/urls.py +++ b/backend/urls.py @@ -1,4 +1,5 @@ """Backend app URL Configuration""" + from django.urls import path from backend.views import ( diff --git a/backend/utils.py b/backend/utils.py index bb4a867..86bbfd1 100644 --- a/backend/utils.py +++ b/backend/utils.py @@ -1,4 +1,5 @@ """Utility functions for backend app""" + import subprocess from email.utils import parsedate_to_datetime from functools import cache diff --git a/backend/views.py b/backend/views.py index 0de6689..b2d2620 100644 --- a/backend/views.py +++ b/backend/views.py @@ -1,4 +1,5 @@ """Views for backend app""" + import json from typing import Dict diff --git a/category/admin.py b/category/admin.py index 608075c..3d997b1 100644 --- a/category/admin.py +++ b/category/admin.py @@ -1,4 +1,5 @@ """Category admin classes""" + from django.contrib import admin from django.http import HttpResponseRedirect from django.urls import reverse, reverse_lazy diff --git a/category/apps.py b/category/apps.py index 3fec6ac..fab100d 100644 --- a/category/apps.py +++ b/category/apps.py @@ -1,4 +1,5 @@ """Category Application""" + from django.apps import AppConfig diff --git a/category/forms.py b/category/forms.py index 5e8a696..c81a58d 100644 --- a/category/forms.py +++ b/category/forms.py @@ -1,4 +1,5 @@ """Forms for category app""" + from django.forms import ModelForm, IntegerField, Form, HiddenInput, ModelChoiceField, CharField from django.utils.translation import gettext_lazy as _ diff --git a/category/models.py b/category/models.py index 5144f3d..cdaba8d 100644 --- a/category/models.py +++ b/category/models.py @@ -1,4 +1,5 @@ """Models""" + from django.db.models import CharField, SlugField, BooleanField, ForeignKey, CASCADE from django.utils.translation import gettext_lazy as _ diff --git a/category/urls.py b/category/urls.py index c32214c..f4e2851 100644 --- a/category/urls.py +++ b/category/urls.py @@ -1,4 +1,5 @@ """Backend app URL Configuration""" + from django.urls import path from category.views import ( diff --git a/category/views.py b/category/views.py index 44bd304..19ad242 100644 --- a/category/views.py +++ b/category/views.py @@ -1,4 +1,5 @@ """Views for categories""" + from django.conf import settings from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin diff --git a/chords/markdown.py b/chords/markdown.py index b6af3c6..a05af39 100644 --- a/chords/markdown.py +++ b/chords/markdown.py @@ -1,4 +1,5 @@ """Module containing Rendering function for converting Markdown to HTML""" + import mistune from chords.plugins.chords import chords diff --git a/chords/plugins/chords.py b/chords/plugins/chords.py index 8b40a0e..74c3aaa 100644 --- a/chords/plugins/chords.py +++ b/chords/plugins/chords.py @@ -1,4 +1,5 @@ """Markdown extension for chords""" + from mistune import InlineState CHORD_RE = r"\{(?!\s)(?P.+?)(?!\s)\}" diff --git a/chords/plugins/paragraph.py b/chords/plugins/paragraph.py index 49372b1..bfe64e3 100644 --- a/chords/plugins/paragraph.py +++ b/chords/plugins/paragraph.py @@ -1,4 +1,5 @@ """Markdown extension for paragraphs""" + import re import string diff --git a/chords/plugins/spaces.py b/chords/plugins/spaces.py index 9ce7bc0..1b2ca30 100644 --- a/chords/plugins/spaces.py +++ b/chords/plugins/spaces.py @@ -1,4 +1,5 @@ """Markdown extension for spaces""" + from mistune import InlineState SPACES_RE = r"\/(?P\d+)\/" diff --git a/chords/urls.py b/chords/urls.py index dada1ee..4b9a4d1 100644 --- a/chords/urls.py +++ b/chords/urls.py @@ -13,6 +13,7 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + import debug_toolbar from django.conf import settings from django.conf.urls.static import static diff --git a/frontend/apps.py b/frontend/apps.py index 7dea73d..0dcfb13 100644 --- a/frontend/apps.py +++ b/frontend/apps.py @@ -1,4 +1,5 @@ """Frontend App""" + from django.apps import AppConfig diff --git a/pdf/__init__.py b/pdf/__init__.py index f46be44..4137d56 100644 --- a/pdf/__init__.py +++ b/pdf/__init__.py @@ -1,4 +1,5 @@ """Initialize PDF module, specifically create media directory if it doesn't exist""" + from pathlib import Path from django.conf import settings diff --git a/pdf/admin.py b/pdf/admin.py index 318dc1f..0a1a966 100644 --- a/pdf/admin.py +++ b/pdf/admin.py @@ -1,4 +1,5 @@ """PDF Admin classes""" + from urllib.parse import urlencode from django.contrib import admin diff --git a/pdf/apps.py b/pdf/apps.py index 64f62a2..71df8c7 100644 --- a/pdf/apps.py +++ b/pdf/apps.py @@ -1,4 +1,5 @@ """App configuration""" + from django.apps import AppConfig diff --git a/pdf/cachemenuitem.py b/pdf/cachemenuitem.py index 973f76f..76b4646 100644 --- a/pdf/cachemenuitem.py +++ b/pdf/cachemenuitem.py @@ -1,4 +1,5 @@ """Module for menu items stored in cache""" + from django.core.cache import cache from menu import MenuItem diff --git a/pdf/forms.py b/pdf/forms.py index ded8eba..3290432 100644 --- a/pdf/forms.py +++ b/pdf/forms.py @@ -1,4 +1,5 @@ """Forms for PDF application""" + from django.core.exceptions import ValidationError from django.forms import ModelForm, CharField, BaseFormSet, HiddenInput, Form, IntegerField from django.utils.translation import gettext_lazy as _ diff --git a/pdf/generate.py b/pdf/generate.py index f14bbdc..86f747b 100644 --- a/pdf/generate.py +++ b/pdf/generate.py @@ -1,4 +1,5 @@ """Module containing all things related to generating PDF""" + import locale import logging import mimetypes diff --git a/pdf/locales.py b/pdf/locales.py index 951250c..e5fc79a 100644 --- a/pdf/locales.py +++ b/pdf/locales.py @@ -1,4 +1,5 @@ """Utils module for locale manipulation""" + import locale from contextlib import contextmanager diff --git a/pdf/management/commands/generate_pdf.py b/pdf/management/commands/generate_pdf.py index 20babba..6fcdcb3 100644 --- a/pdf/management/commands/generate_pdf.py +++ b/pdf/management/commands/generate_pdf.py @@ -1,4 +1,5 @@ """Management command for generating PDF files from requests""" + import logging from argparse import ArgumentParser from pathlib import Path diff --git a/pdf/menus.py b/pdf/menus.py index 40569fa..7bcfe57 100644 --- a/pdf/menus.py +++ b/pdf/menus.py @@ -1,4 +1,5 @@ """Menus for PDF app""" + from django.urls import reverse from django.utils.translation import gettext_lazy as _ from menu import Menu, MenuItem diff --git a/pdf/models/__init__.py b/pdf/models/__init__.py index 1d82ca3..6cd127e 100644 --- a/pdf/models/__init__.py +++ b/pdf/models/__init__.py @@ -1,4 +1,5 @@ """Common classes for PDF""" + from django.conf import settings from django.db.models import Model, BooleanField, CharField, ImageField, FloatField from django.utils.translation import gettext_lazy as _ diff --git a/pdf/models/request.py b/pdf/models/request.py index 004444c..6d6e9ad 100644 --- a/pdf/models/request.py +++ b/pdf/models/request.py @@ -1,4 +1,5 @@ """Models for PDF module""" + from datetime import datetime from typing import List diff --git a/pdf/storage.py b/pdf/storage.py index 94d69bb..d90f65d 100644 --- a/pdf/storage.py +++ b/pdf/storage.py @@ -1,4 +1,5 @@ """Storages for the PDF application""" + from pathlib import Path from django.core.files.storage import FileSystemStorage diff --git a/pdf/templatetags/types.py b/pdf/templatetags/types.py index 573242b..3029fee 100644 --- a/pdf/templatetags/types.py +++ b/pdf/templatetags/types.py @@ -1,4 +1,5 @@ """Template tags for transforming PDFRequest column types""" + import os from django import template diff --git a/pdf/urls.py b/pdf/urls.py index a968d51..67d239f 100644 --- a/pdf/urls.py +++ b/pdf/urls.py @@ -1,4 +1,5 @@ """Url configuration for PDF app""" + from django.urls import path from pdf.views import ( diff --git a/pdf/utils.py b/pdf/utils.py index 38af8ce..0d7e5c3 100644 --- a/pdf/utils.py +++ b/pdf/utils.py @@ -1,4 +1,5 @@ """Utility functions""" + import logging from datetime import timedelta diff --git a/pdf/views.py b/pdf/views.py index 51b63ad..dbbe03d 100644 --- a/pdf/views.py +++ b/pdf/views.py @@ -1,4 +1,5 @@ """Views for PDF app""" + from django.conf import settings from django.contrib import messages from django.core.cache import cache diff --git a/tenants/admin.py b/tenants/admin.py index 07728d5..4696fcc 100644 --- a/tenants/admin.py +++ b/tenants/admin.py @@ -1,4 +1,5 @@ """Admin models for Tenants""" + from django.conf import settings from django.contrib import admin from django.urls import reverse_lazy, reverse diff --git a/tenants/apps.py b/tenants/apps.py index 67b398b..7829ec7 100644 --- a/tenants/apps.py +++ b/tenants/apps.py @@ -1,4 +1,5 @@ """Tenant App configuration""" + from django.apps import AppConfig diff --git a/tenants/forms.py b/tenants/forms.py index 2a8ac9c..3f06e2f 100644 --- a/tenants/forms.py +++ b/tenants/forms.py @@ -1,4 +1,5 @@ """Tenant forms""" + from django.forms import ModelForm, CharField from tenants.models import Tenant diff --git a/tenants/menus.py b/tenants/menus.py index 14f1b23..1663c0a 100644 --- a/tenants/menus.py +++ b/tenants/menus.py @@ -1,4 +1,5 @@ """Generates Tenant-specific menus""" + import os from django.conf import settings diff --git a/tenants/middleware.py b/tenants/middleware.py index 42dc1cc..eca06cb 100644 --- a/tenants/middleware.py +++ b/tenants/middleware.py @@ -1,4 +1,5 @@ """Middleware for Tenants""" + from urllib.parse import urlparse from django.conf import settings from django.http import Http404 diff --git a/tenants/models.py b/tenants/models.py index 7088018..6606782 100644 --- a/tenants/models.py +++ b/tenants/models.py @@ -1,4 +1,5 @@ """Tenant models""" + from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.db.models import Model, CharField, ManyToManyField, BooleanField, ImageField diff --git a/tenants/urls.py b/tenants/urls.py index 26ab33c..8ebdfc1 100644 --- a/tenants/urls.py +++ b/tenants/urls.py @@ -1,4 +1,5 @@ """URLs for Tenant""" + from django.urls import path from tenants.views import TenantUpdateForm diff --git a/tenants/utils.py b/tenants/utils.py index 4921eb2..fa49254 100644 --- a/tenants/utils.py +++ b/tenants/utils.py @@ -1,4 +1,5 @@ """Utility methods""" + from tenants.models import Tenant diff --git a/tenants/views.py b/tenants/views.py index 3d0983a..8ac46ac 100644 --- a/tenants/views.py +++ b/tenants/views.py @@ -1,4 +1,5 @@ """Tenant views""" + from django.contrib.messages.views import SuccessMessageMixin from django.urls import reverse_lazy from django.views.generic import UpdateView