Code

Ticket #10842: fix_re_django-1.1-dev.diff

File fix_re_django-1.1-dev.diff, 1.0 KB (added by hgdeoro, 5 years ago)

fixes for django 1.1-dev

Line 
1diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py
2index 3582460..47cb2af 100644
3--- a/django/db/backends/postgresql/operations.py
4+++ b/django/db/backends/postgresql/operations.py
5@@ -2,7 +2,7 @@ import re
6 
7 from django.db.backends import BaseDatabaseOperations
8 
9-server_version_re = re.compile(r'PostgreSQL (\d{1,2})\.(\d{1,2})\.?(\d{1,2})?')
10+server_version_re = re.compile(r'\S+ (\d{1,2})\.(\d{1,2})\.?(\d{1,2})?')
11 
12 # This DatabaseOperations class lives in here instead of base.py because it's
13 # used by both the 'postgresql' and 'postgresql_psycopg2' backends.
14diff --git a/django/db/backends/postgresql/version.py b/django/db/backends/postgresql/version.py
15index ed2ad9e..9578035 100644
16--- a/django/db/backends/postgresql/version.py
17+++ b/django/db/backends/postgresql/version.py
18@@ -9,6 +9,7 @@ import re
19 #   PostgreSQL 8.3.6
20 #   EnterpriseDB 8.3
21 #   PostgreSQL 8.3 beta4
22+#   PostgreSQL 8.4beta1
23 VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)')
24 
25 def get_version(cursor):