From df2f2e4c37c7674aa44a40ab179013ee91d0b813 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 29 Dec 2022 18:49:14 +0100 Subject: [PATCH] Remove useless imports --- nummi/main/models.py | 1 - nummi/main/templatetags/main_extras.py | 1 - nummi/main/tests.py | 1 - nummi/main/views.py | 5 +---- nummi/nummi/urls.py | 3 --- nummi/plot/admin.py | 1 - nummi/plot/models.py | 1 - nummi/plot/tests.py | 1 - nummi/plot/views.py | 2 +- 9 files changed, 2 insertions(+), 14 deletions(-) diff --git a/nummi/main/models.py b/nummi/main/models.py index 58a88a5..06a4e4c 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -2,7 +2,6 @@ import pathlib import uuid from datetime import date -from django.core.files.storage import Storage from django.core.validators import FileExtensionValidator from django.db import models from django.forms import ModelForm diff --git a/nummi/main/templatetags/main_extras.py b/nummi/main/templatetags/main_extras.py index 22c2d3c..41978d7 100644 --- a/nummi/main/templatetags/main_extras.py +++ b/nummi/main/templatetags/main_extras.py @@ -1,5 +1,4 @@ from django import template -from django.template.defaultfilters import stringfilter from django.utils import formats from django.utils.safestring import mark_safe diff --git a/nummi/main/tests.py b/nummi/main/tests.py index 7ce503c..4929020 100644 --- a/nummi/main/tests.py +++ b/nummi/main/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/nummi/main/views.py b/nummi/main/views.py index 10ecf1b..4430392 100644 --- a/nummi/main/views.py +++ b/nummi/main/views.py @@ -1,5 +1,4 @@ from django.contrib.auth import views as auth_views -from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.postgres.search import ( SearchQuery, @@ -7,10 +6,8 @@ from django.contrib.postgres.search import ( SearchVector, TrigramSimilarity, ) -from django.core.paginator import Paginator from django.db import models -from django.http import HttpResponse -from django.shortcuts import get_object_or_404, redirect, render +from django.shortcuts import get_object_or_404, redirect from django.urls import reverse_lazy from django.views.generic import ( CreateView, diff --git a/nummi/nummi/urls.py b/nummi/nummi/urls.py index e933645..032f4b9 100644 --- a/nummi/nummi/urls.py +++ b/nummi/nummi/urls.py @@ -13,12 +13,9 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ -from django.conf import settings from django.conf.urls.i18n import i18n_patterns -from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path -from django.views.generic.base import RedirectView from . import views diff --git a/nummi/plot/admin.py b/nummi/plot/admin.py index 8c38f3f..b97a94f 100644 --- a/nummi/plot/admin.py +++ b/nummi/plot/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/nummi/plot/models.py b/nummi/plot/models.py index 71a8362..35e0d64 100644 --- a/nummi/plot/models.py +++ b/nummi/plot/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/nummi/plot/tests.py b/nummi/plot/tests.py index 7ce503c..4929020 100644 --- a/nummi/plot/tests.py +++ b/nummi/plot/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/nummi/plot/views.py b/nummi/plot/views.py index 115cc33..46ebfa5 100644 --- a/nummi/plot/views.py +++ b/nummi/plot/views.py @@ -9,7 +9,7 @@ from django.shortcuts import get_object_or_404 from django.utils.translation import gettext as _ from matplotlib import dates as mdates -from main.models import Category, Invoice, Snapshot, Transaction +from main.models import Category, Snapshot, Transaction matplotlib.use("Agg") plt.style.use("./plot/nummi.mplstyle")