diff options
author | Andrew Godwin <andrew@aeracode.org> | 2013-09-06 15:27:51 -0500 |
---|---|---|
committer | Andrew Godwin <andrew@aeracode.org> | 2013-09-06 15:28:12 -0500 |
commit | efd1e6096ee87fe332cf989ba5479e9461d0fb3a (patch) | |
tree | 3c80b74328fa5d9efa5dd0344a213f4ae79566cf /django/db/backends/postgresql_psycopg2/operations.py | |
parent | 5ca290f5db3a5f735cdbdc7130c044192beb7f66 (diff) | |
download | django-efd1e6096ee87fe332cf989ba5479e9461d0fb3a.tar.gz |
Adding 'sqlmigrate' command and quote_parameter to support it.
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r-- | django/db/backends/postgresql_psycopg2/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py index cc78ffe449..723453c9c5 100644 --- a/django/db/backends/postgresql_psycopg2/operations.py +++ b/django/db/backends/postgresql_psycopg2/operations.py @@ -98,6 +98,11 @@ class DatabaseOperations(BaseDatabaseOperations): return name # Quoting once is enough. return '"%s"' % name + def quote_parameter(self, value): + # Inner import so backend fails nicely if it's not present + import psycopg2 + return psycopg2.extensions.adapt(value) + def set_time_zone_sql(self): return "SET TIME ZONE %s" |