Commit 4781db80 authored by Michal Čihař's avatar Michal Čihař

Detect another PostgreSQL backend

I know this is ugly, but I don't see better way.

Once we stop supporting Django 1.7, this code will be subject to major
cleanup and better solution could be found.

Fixes #869
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d1a6ca88
...@@ -33,6 +33,8 @@ def get_template(): ...@@ -33,6 +33,8 @@ def get_template():
''' '''
if 'psycopg2' in settings.DATABASES['default']['ENGINE']: if 'psycopg2' in settings.DATABASES['default']['ENGINE']:
return '%(function)s(%(field)s::int)' return '%(function)s(%(field)s::int)'
if 'postgre' in settings.DATABASES['default']['ENGINE']:
return '%(function)s(%(field)s::int)'
return '%(function)s(%(field)s)' return '%(function)s(%(field)s)'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment