Closed betonetotbo closed 4 years ago
Hi, @betonetotbo, @maxirobaina!
I urgently needed support for Firebird in Django 2.0.3 and came across same issues. And I managed to solve it. Please do it venv, under your own responsibility. So far it works for me. Please let me know if it worked for you!
Here is what I did:
self.client_class = DatabaseClient
self.creation_class = DatabaseCreation
self.features_class = DatabaseFeatures
self.introspection_class = DatabaseIntrospection
self.ops_class = DatabaseOperations
self.validation_class = DatabaseValidation
def create_cursor(self, name=None):
Firebird/compiler.py
line 25, removed 'subquery=subuquery' positional argument for as_sql method :
sql, params = super(SQLCompiler, self).as_sql(with_limits=False, with_col_aliases=with_col_aliases)
Firebird/schema.py
lines 10, 13, commented out logger imports:
#from django.utils.log import getLogger
#logger = getLogger('django.db.backends.schema')
Firebird/operations.py
substitute the line 205 value = utils.typecast_decimal(val)
with the following code:
if val is None or val == '':
val = None
else:
val = decimal.Decimal(val)
About my previous comment: turns out it it fixes only some issues. Afterwards it is not possible to make complicated queries. Unfortunately I do not have knowledge to dig further in
Hi @cashaev
Can you provide me some examples of that complicated queries that you want to do an what problems do you have?
Regards.
C:\work\django1\lib\site-packages\firebird\introspection.py
try:
from django.utils.deprecation import RemovedInDjango21Warning
except ImportError:
RemovedInDjango21Warning = None
and under that:
if RemovedInDjango21Warning:
def get_indexes(self, cursor, table_name):
it will work on py3 + django 2.2
Some of the django 2.2 issues are fixed by #111
I guess this can be closed
Please support Django 2.x.
After removing the
getLogger
import fromschema.py
I'm trying it but getting: