From 2c3e72245875aee23d4504321550de4fee93f26b Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 30 Jun 2021 15:14:37 +0200 Subject: [PATCH] working on migrations --- ..._full_text_index.py => 0141_build_full_text_index.py} | 3 +-- ...reate_searchfields.py => 0142_create_searchfields.py} | 2 +- cookbook/views/views.py | 9 +++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename cookbook/migrations/{0127_build_full_text_index.py => 0141_build_full_text_index.py} (97%) rename cookbook/migrations/{0128_create_searchfields.py => 0142_create_searchfields.py} (92%) diff --git a/cookbook/migrations/0127_build_full_text_index.py b/cookbook/migrations/0141_build_full_text_index.py similarity index 97% rename from cookbook/migrations/0127_build_full_text_index.py rename to cookbook/migrations/0141_build_full_text_index.py index 1491570f9..0163a0ed3 100644 --- a/cookbook/migrations/0127_build_full_text_index.py +++ b/cookbook/migrations/0141_build_full_text_index.py @@ -27,8 +27,7 @@ def set_default_search_vector(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('auth', '0012_alter_user_first_name_max_length'), - ('cookbook', '0126_alter_userpreference_theme'), + ('cookbook', '0140_userpreference_created_at'), ] operations = [ migrations.AddField( diff --git a/cookbook/migrations/0128_create_searchfields.py b/cookbook/migrations/0142_create_searchfields.py similarity index 92% rename from cookbook/migrations/0128_create_searchfields.py rename to cookbook/migrations/0142_create_searchfields.py index 131ce7ab4..a61f1852f 100644 --- a/cookbook/migrations/0128_create_searchfields.py +++ b/cookbook/migrations/0142_create_searchfields.py @@ -13,7 +13,7 @@ def create_searchfields(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('cookbook', '0127_build_full_text_index'), + ('cookbook', '0141_build_full_text_index'), ] operations = [ diff --git a/cookbook/views/views.py b/cookbook/views/views.py index b9ce7d00a..a67336780 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -3,7 +3,6 @@ import re from datetime import datetime from uuid import UUID -from allauth.account.forms import SignupForm from django.conf import settings from django.contrib import messages from django.contrib.auth import update_session_auth_hash @@ -12,8 +11,10 @@ from django.contrib.auth.forms import PasswordChangeForm 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 import Avg, Q +from django.db.models import Sum from django.http import HttpResponseRedirect +from django.http import JsonResponse from django.shortcuts import get_object_or_404, render, redirect from django.urls import reverse, reverse_lazy from django.utils import timezone @@ -25,8 +26,8 @@ from rest_framework.authtoken.models import Token from cookbook.filters import RecipeFilter from cookbook.forms import (CommentForm, Recipe, User, UserCreateForm, UserNameForm, UserPreference, - UserPreferenceForm, SpaceJoinForm, SpaceCreateForm, - SearchPreferenceForm, AllAuthSignupForm) + UserPreferenceForm, SpaceJoinForm, SpaceCreateForm, SearchPreferenceForm) +from cookbook.helper.ingredient_parser import parse from cookbook.helper.permission_helper import group_required, share_link_valid, has_group_permission from cookbook.models import (Comment, CookLog, InviteLink, MealPlan, RecipeBook, RecipeBookEntry, ViewLog, ShoppingList, Space, Keyword, RecipeImport, Unit,