Organise imports using isort --profile black

This commit is contained in:
Edgar P. Burkhart 2022-12-21 15:42:30 +01:00
parent 364ad42c05
commit 6d0fb174eb
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
10 changed files with 28 additions and 30 deletions

View file

@ -1,6 +1,6 @@
from django.contrib import admin from django.contrib import admin
from .models import Transaction, Invoice, Category, Snapshot from .models import Category, Invoice, Snapshot, Transaction
admin.site.register(Transaction) admin.site.register(Transaction)
admin.site.register(Invoice) admin.site.register(Invoice)

View file

@ -1,12 +1,13 @@
# Generated by Django 4.0.4 on 2022-05-22 07:45 # Generated by Django 4.0.4 on 2022-05-22 07:45
import datetime import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import re import re
import uuid import uuid
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):

View file

@ -1,9 +1,10 @@
# Generated by Django 4.1.4 on 2022-12-20 14:26 # Generated by Django 4.1.4 on 2022-12-20 14:26
import datetime import datetime
import django.core.validators import django.core.validators
from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):

View file

@ -1,6 +1,7 @@
# Generated by Django 4.1.4 on 2022-12-21 08:53 # Generated by Django 4.1.4 on 2022-12-21 08:53
import datetime import datetime
import django.core.validators import django.core.validators
from django.db import migrations, models from django.db import migrations, models

View file

@ -1,11 +1,12 @@
import pathlib import pathlib
from datetime import date
import uuid 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.db import models
from django.forms import ModelForm from django.forms import ModelForm
from django.core.validators import FileExtensionValidator
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.core.files.storage import Storage
class Category(models.Model): class Category(models.Model):

View file

@ -1,21 +1,21 @@
from django.shortcuts import render, get_object_or_404, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views as auth_views 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.auth.mixins import LoginRequiredMixin
from django.views.generic import ListView
from django.core.paginator import Paginator from django.core.paginator import Paginator
from django.db import models from django.db import models
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.views.generic import ListView
from .models import ( from .models import (
Transaction,
TransactionForm,
Invoice,
InvoiceForm,
Category, Category,
CategoryForm, CategoryForm,
Invoice,
InvoiceForm,
Snapshot, Snapshot,
SnapshotForm, SnapshotForm,
Transaction,
TransactionForm,
) )

View file

@ -10,8 +10,8 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/ https://docs.djangoproject.com/en/4.0/ref/settings/
""" """
from pathlib import Path
import os import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent

View file

@ -13,12 +13,12 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path 1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 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.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin from django.contrib import admin
from django.urls import include, path from django.urls import include, path
from django.views.generic.base import RedirectView from django.views.generic.base import RedirectView
from django.conf import settings
from django.conf.urls.static import static
from . import views from . import views

View file

@ -1,6 +1,6 @@
from django.conf import settings from django.conf import settings
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.views.static import serve from django.views.static import serve

View file

@ -2,20 +2,14 @@ import io
import matplotlib import matplotlib
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from matplotlib import dates as mdates
from django.db import models
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404 from django.db import models
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from matplotlib import dates as mdates
from main.models import ( from main.models import Category, Invoice, Snapshot, Transaction
Transaction,
Invoice,
Category,
Snapshot,
)
matplotlib.use("Agg") matplotlib.use("Agg")
plt.style.use("./plot/nummi.mplstyle") plt.style.use("./plot/nummi.mplstyle")