mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
minor cleanup
This commit is contained in:
@@ -7,12 +7,9 @@ from django.urls import reverse, reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import DeleteView
|
||||
|
||||
from cookbook.helper.permission_helper import (GroupRequiredMixin,
|
||||
OwnerRequiredMixin,
|
||||
group_required)
|
||||
from cookbook.models import (Comment, InviteLink, MealPlan, Recipe,
|
||||
RecipeBook, RecipeBookEntry, RecipeImport,
|
||||
Storage, Sync)
|
||||
from cookbook.helper.permission_helper import GroupRequiredMixin, OwnerRequiredMixin, group_required
|
||||
from cookbook.models import (Comment, InviteLink, MealPlan, Recipe, RecipeBook, RecipeBookEntry,
|
||||
RecipeImport, Storage, Sync)
|
||||
from cookbook.provider.dropbox import Dropbox
|
||||
from cookbook.provider.local import Local
|
||||
from cookbook.provider.nextcloud import Nextcloud
|
||||
|
||||
@@ -2,22 +2,16 @@ import os
|
||||
|
||||
from django.contrib import messages
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import get_object_or_404, render, redirect
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from django.views.generic.edit import FormMixin
|
||||
|
||||
from cookbook.forms import (CommentForm, ExternalRecipeForm,
|
||||
MealPlanForm,
|
||||
StorageForm, SyncForm,
|
||||
)
|
||||
from cookbook.helper.permission_helper import (GroupRequiredMixin,
|
||||
OwnerRequiredMixin,
|
||||
group_required)
|
||||
from cookbook.models import (Comment, MealPlan,
|
||||
MealType, Recipe, RecipeImport,
|
||||
Storage, Sync, UserPreference)
|
||||
from cookbook.forms import CommentForm, ExternalRecipeForm, MealPlanForm, StorageForm, SyncForm
|
||||
from cookbook.helper.permission_helper import GroupRequiredMixin, OwnerRequiredMixin, group_required
|
||||
from cookbook.models import (Comment, MealPlan, MealType, Recipe, RecipeImport, Storage, Sync,
|
||||
UserPreference)
|
||||
from cookbook.provider.dropbox import Dropbox
|
||||
from cookbook.provider.local import Local
|
||||
from cookbook.provider.nextcloud import Nextcloud
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
import re
|
||||
import threading
|
||||
from io import BytesIO
|
||||
from django.core.cache import cache
|
||||
|
||||
from django.contrib import messages
|
||||
from django.core.cache import cache
|
||||
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.shortcuts import get_object_or_404, render
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from cookbook.forms import ExportForm, ImportForm, ImportExportBase
|
||||
from cookbook.forms import ExportForm, ImportExportBase, ImportForm
|
||||
from cookbook.helper.permission_helper import group_required
|
||||
from cookbook.integration.cookbookapp import CookBookApp
|
||||
from cookbook.integration.copymethat import CopyMeThat
|
||||
from cookbook.integration.pepperplate import Pepperplate
|
||||
from cookbook.integration.cheftap import ChefTap
|
||||
from cookbook.integration.chowdown import Chowdown
|
||||
from cookbook.integration.cookbookapp import CookBookApp
|
||||
from cookbook.integration.copymethat import CopyMeThat
|
||||
from cookbook.integration.default import Default
|
||||
from cookbook.integration.domestica import Domestica
|
||||
from cookbook.integration.mealie import Mealie
|
||||
@@ -23,14 +22,15 @@ from cookbook.integration.mealmaster import MealMaster
|
||||
from cookbook.integration.nextcloud_cookbook import NextcloudCookbook
|
||||
from cookbook.integration.openeats import OpenEats
|
||||
from cookbook.integration.paprika import Paprika
|
||||
from cookbook.integration.pdfexport import PDFexport
|
||||
from cookbook.integration.pepperplate import Pepperplate
|
||||
from cookbook.integration.plantoeat import Plantoeat
|
||||
from cookbook.integration.recipekeeper import RecipeKeeper
|
||||
from cookbook.integration.recettetek import RecetteTek
|
||||
from cookbook.integration.recipekeeper import RecipeKeeper
|
||||
from cookbook.integration.recipesage import RecipeSage
|
||||
from cookbook.integration.rezkonv import RezKonv
|
||||
from cookbook.integration.saffron import Saffron
|
||||
from cookbook.integration.pdfexport import PDFexport
|
||||
from cookbook.models import Recipe, ImportLog, ExportLog, UserPreference
|
||||
from cookbook.models import ExportLog, ImportLog, Recipe, UserPreference
|
||||
from recipes import settings
|
||||
|
||||
|
||||
|
||||
@@ -5,19 +5,17 @@ from smtplib import SMTPException
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.models import Group
|
||||
from django.core.mail import send_mail, BadHeaderError
|
||||
from django.core.mail import BadHeaderError, send_mail
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import CreateView
|
||||
|
||||
from cookbook.forms import (ImportRecipeForm, InviteLinkForm,
|
||||
MealPlanForm, Storage, StorageForm)
|
||||
from cookbook.helper.permission_helper import (GroupRequiredMixin,
|
||||
group_required)
|
||||
from cookbook.models import (InviteLink, MealPlan, MealType, Recipe,
|
||||
RecipeBook, RecipeImport, ShareLink, Step, UserPreference)
|
||||
from cookbook.forms import ImportRecipeForm, InviteLinkForm, MealPlanForm, Storage, StorageForm
|
||||
from cookbook.helper.permission_helper import GroupRequiredMixin, group_required
|
||||
from cookbook.models import (InviteLink, MealPlan, MealType, Recipe, RecipeBook, RecipeImport,
|
||||
ShareLink, Step, UserPreference)
|
||||
from cookbook.views.edit import SpaceFormMixing
|
||||
from recipes import settings
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from cookbook.helper.ingredient_parser import IngredientParser
|
||||
from cookbook.helper.permission_helper import group_required
|
||||
from cookbook.models import TelegramBot, ShoppingList, ShoppingListEntry
|
||||
from cookbook.models import ShoppingList, ShoppingListEntry, TelegramBot
|
||||
|
||||
|
||||
@group_required('user')
|
||||
|
||||
@@ -12,6 +12,7 @@ from django.contrib.auth.models import Group
|
||||
from django.contrib.auth.password_validation import validate_password
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db.models import Avg, Q, Sum
|
||||
from django.db.models.functions import Lower
|
||||
from django.http import HttpResponseRedirect, JsonResponse
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse, reverse_lazy
|
||||
|
||||
Reference in New Issue
Block a user