<reponame>w0rp/djorm-ext-pgfulltext<filename>djorm_pgfulltext/utils.py
import psycopg2

from django.db import connection
from django.utils.text import force_text


def adapt(text):
    a = psycopg2.extensions.adapt(force_text(text))
    a.prepare(connection.connection)
    return a

import psycopg2

from django.db import connection
from django.utils.text import force_text


def adapt(text):
    a = psycopg2.extensions.adapt(force_text(text))
    a.prepare(connection.connection)
    return a