mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
remove deprecated django.db.backends.postgresql_psycopg2
This commit is contained in:
@@ -9,7 +9,7 @@ from django.utils import translation
|
||||
from django_scopes import scopes_disabled
|
||||
|
||||
from cookbook.managers import DICTIONARY
|
||||
from cookbook.models import (Index, PermissionModelMixin, Recipe, Step, SearchFields)
|
||||
from cookbook.models import Index, PermissionModelMixin, Recipe, SearchFields, Step
|
||||
|
||||
|
||||
def allSearchFields():
|
||||
@@ -21,7 +21,7 @@ def nameSearchField():
|
||||
|
||||
|
||||
def set_default_search_vector(apps, schema_editor):
|
||||
if settings.DATABASES['default']['ENGINE'] not in ['django.db.backends.postgresql_psycopg2', 'django.db.backends.postgresql']:
|
||||
if settings.DATABASES['default']['ENGINE'] != 'django.db.backends.postgresql':
|
||||
return
|
||||
language = DICTIONARY.get(translation.get_language(), 'simple')
|
||||
with scopes_disabled():
|
||||
|
||||
Reference in New Issue
Block a user