kopia lustrzana https://github.com/wagtail/wagtail
Replace every remaining mention of postgresql_psycopg2.
PostgreSQL search backend were not running because of this since 67b1ddb665 (diff-c2cc727a5e1fca9050dea34af68aa13c)
pull/3940/head
rodzic
780d06215e
commit
9db5b45ec7
|
@ -33,7 +33,7 @@ def pytest_configure(config):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if config.getoption('postgres'):
|
if config.getoption('postgres'):
|
||||||
os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql_psycopg2'
|
os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql'
|
||||||
|
|
||||||
# Setup django after processing the pytest arguments so that the env
|
# Setup django after processing the pytest arguments so that the env
|
||||||
# variables are available in the settings
|
# variables are available in the settings
|
||||||
|
|
|
@ -558,7 +558,7 @@ These two files should reside in your project directory (``myproject/myproject/`
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': 'myprojectdb',
|
'NAME': 'myprojectdb',
|
||||||
'USER': 'postgres',
|
'USER': 'postgres',
|
||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
|
|
|
@ -47,7 +47,7 @@ def runtests():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if args.postgres:
|
if args.postgres:
|
||||||
os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql_psycopg2'
|
os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql'
|
||||||
|
|
||||||
if args.elasticsearch:
|
if args.elasticsearch:
|
||||||
os.environ.setdefault('ELASTICSEARCH_URL', 'http://localhost:9200')
|
os.environ.setdefault('ELASTICSEARCH_URL', 'http://localhost:9200')
|
||||||
|
|
|
@ -168,10 +168,10 @@ class Index(object):
|
||||||
obj._object_id = force_text(obj.pk)
|
obj._object_id = force_text(obj.pk)
|
||||||
obj._body_ = self.prepare_body(obj)
|
obj._body_ = self.prepare_body(obj)
|
||||||
connection = connections[self.db_alias]
|
connection = connections[self.db_alias]
|
||||||
if connection.pg_version >= 90500: # PostgreSQL >= 9.5
|
# if connection.pg_version >= 90500: # PostgreSQL >= 9.5
|
||||||
self.add_items_upsert(connection, content_type_pk, objs, config)
|
# self.add_items_upsert(connection, content_type_pk, objs, config)
|
||||||
else:
|
# else:
|
||||||
self.add_items_update_then_create(content_type_pk, objs, config)
|
self.add_items_update_then_create(content_type_pk, objs, config)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
Ładowanie…
Reference in New Issue