Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

Fixed two issues arising when the backend is used against Django v1.5: #13

Open
wants to merge 1 commit into
base: django-1.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sql_server/pyodbc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
from django.db.backends.signals import connection_created
from django.conf import settings
from django import VERSION as DjangoVersion
if DjangoVersion[:2] == (1,4):

if DjangoVersion[:2] == (1,5):
# Django version 1.5 requires connection to be passed
# to BaseDatabaseOperations
_DJANGO_VERSION = 15
elif DjangoVersion[:2] == (1,4):
# Django version 1.4 adds a backwards incompatible change to
# DatabaseOperations
_DJANGO_VERSION = 14
Expand Down
2 changes: 1 addition & 1 deletion sql_server/pyodbc/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _as_sql(self, strategy):
result.append('WHERE %s' % where)
params.extend(w_params)

grouping, gb_params = self.get_grouping()
grouping, gb_params = self.get_grouping( ordering_group_by )
if grouping:
if ordering:
# If the backend can't group by PK (i.e., any database
Expand Down