diff --git a/api/admin.py b/api/admin.py index 8c38f3f..b97a94f 100644 --- a/api/admin.py +++ b/api/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/api/models.py b/api/models.py index 71a8362..35e0d64 100644 --- a/api/models.py +++ b/api/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/api/tests.py b/api/tests.py index 7ce503c..4929020 100644 --- a/api/tests.py +++ b/api/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/cbt/admin.py b/cbt/admin.py index 8c38f3f..b97a94f 100644 --- a/cbt/admin.py +++ b/cbt/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/cbt/tests.py b/cbt/tests.py index 7ce503c..4929020 100644 --- a/cbt/tests.py +++ b/cbt/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/common/admin.py b/common/admin.py index 8c38f3f..b97a94f 100644 --- a/common/admin.py +++ b/common/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/common/fields.py b/common/fields.py index 4f1593c..6b11e00 100644 --- a/common/fields.py +++ b/common/fields.py @@ -1,5 +1,5 @@ from django.db import models -from django.core.validators import MinValueValidator, MaxValueValidator, validate_comma_separated_integer_list +from django.core.validators import MinValueValidator, MaxValueValidator from multiselectfield import MultiSelectField diff --git a/common/models.py b/common/models.py index 71a8362..35e0d64 100644 --- a/common/models.py +++ b/common/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/common/tests.py b/common/tests.py index 7ce503c..4929020 100644 --- a/common/tests.py +++ b/common/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/common/views.py b/common/views.py index 91ea44a..b8e4ee0 100644 --- a/common/views.py +++ b/common/views.py @@ -1,3 +1,2 @@ -from django.shortcuts import render # Create your views here. diff --git a/cronhandler/admin.py b/cronhandler/admin.py index 8c38f3f..b97a94f 100644 --- a/cronhandler/admin.py +++ b/cronhandler/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/cronhandler/models.py b/cronhandler/models.py index 71a8362..35e0d64 100644 --- a/cronhandler/models.py +++ b/cronhandler/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/cronhandler/tests.py b/cronhandler/tests.py index 7ce503c..4929020 100644 --- a/cronhandler/tests.py +++ b/cronhandler/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/dreams/tests.py b/dreams/tests.py index 7ce503c..4929020 100644 --- a/dreams/tests.py +++ b/dreams/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/dreams/urls.py b/dreams/urls.py index 0375aab..b51ef56 100644 --- a/dreams/urls.py +++ b/dreams/urls.py @@ -1,6 +1,6 @@ from .views import DreamListView, DreamViewView, DreamDeleteView, DreamEditView, DreamCreateView, ThemeListView, ThemeEditView, ThemeCreateView, ThemeDeleteView, NotificationCreateView, NotificationDeleteView, NotificationEditView, NotificationListView -from django.urls import path, include +from django.urls import path app_name = "dreams" diff --git a/dreams/views.py b/dreams/views.py index bcf46f9..d87ccaf 100644 --- a/dreams/views.py +++ b/dreams/views.py @@ -1,6 +1,5 @@ -from django.shortcuts import render -from django.views.generic import TemplateView, ListView, UpdateView, DetailView, CreateView, DeleteView +from django.views.generic import ListView, UpdateView, DetailView, CreateView, DeleteView from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy @@ -93,11 +92,11 @@ class DreamEditView(LoginRequiredMixin, UpdateView): def form_valid(self, form): for theme in form.cleaned_data["themes"]: if theme.user == self.request.user: - if not theme in form.instance.theme_set: + if theme not in form.instance.theme_set: DreamTheme.objects.create(theme=theme, dream=form.instance) for dreamtheme in form.instance.dreamtheme_set.all(): - if not dreamtheme.theme in form.cleaned_data["themes"]: + if dreamtheme.theme not in form.cleaned_data["themes"]: dreamtheme.delete() for attachment in form.cleaned_data["uploads"]: diff --git a/environment/admin.py b/environment/admin.py index 8c38f3f..b97a94f 100644 --- a/environment/admin.py +++ b/environment/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/environment/models.py b/environment/models.py index 71a8362..35e0d64 100644 --- a/environment/models.py +++ b/environment/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/environment/tests.py b/environment/tests.py index 7ce503c..4929020 100644 --- a/environment/tests.py +++ b/environment/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/environment/views.py b/environment/views.py index 91ea44a..b8e4ee0 100644 --- a/environment/views.py +++ b/environment/views.py @@ -1,3 +1,2 @@ -from django.shortcuts import render # Create your views here. diff --git a/friends/admin.py b/friends/admin.py index 8c38f3f..b97a94f 100644 --- a/friends/admin.py +++ b/friends/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/friends/models.py b/friends/models.py index 71a8362..35e0d64 100644 --- a/friends/models.py +++ b/friends/models.py @@ -1,3 +1,2 @@ -from django.db import models # Create your models here. diff --git a/friends/tests.py b/friends/tests.py index 7ce503c..4929020 100644 --- a/friends/tests.py +++ b/friends/tests.py @@ -1,3 +1,2 @@ -from django.test import TestCase # Create your tests here. diff --git a/friends/views.py b/friends/views.py index 91ea44a..b8e4ee0 100644 --- a/friends/views.py +++ b/friends/views.py @@ -1,3 +1,2 @@ -from django.shortcuts import render # Create your views here. diff --git a/frontend/admin.py b/frontend/admin.py index 8c38f3f..b97a94f 100644 --- a/frontend/admin.py +++ b/frontend/admin.py @@ -1,3 +1,2 @@ -from django.contrib import admin # Register your models here. diff --git a/frontend/classes.py b/frontend/classes.py index 421a950..5e45322 100644 --- a/frontend/classes.py +++ b/frontend/classes.py @@ -16,7 +16,7 @@ class NavSection: self.items.sort(key=lambda x: x.order) for item in self.items: - html += f""" + html += """