Open GoogleCodeExporter opened 8 years ago
This patch resolve the problem.
It require a settings.DJANGO_SQLALCHEMY_FALLBACK_ENGINE with the engine like the
standard use of settings.DATABASE_ENGINE.
I know that using the "operators" fields including django.db.backends.* engines
is a
more elegant solution, but load all unused classes break the simplicity rule.
I aim to use django_sqlalchemy with mixed models without touching the common
Django
and 3rd party apps.
Original comment by davide.m...@gmail.com
on 7 May 2008 at 7:57
Attachments:
Thank you for the info. I'm a little confused though. What exactly did you
setup if you're not using django-
sqlalchemy as the backend? In other words, which parts did you specify in your
settings that created this
problem?
Original comment by mtr...@gmail.com
on 9 May 2008 at 1:12
Thank you for your reply Mtrier.
Bellow I explicate better the situation, I'm sorry if I have a not good enough
english. ^_^
I added a new test application with "from django_sqlalchemy import models".
I do NOT changed my models with "from django.db import models".
The test application seems to run well (I test it only in few queries).
The others applications run sometimes well and sometimes not (see the error in
the
first post). There are other errors but this, in this ticket, is the most
important.
I use this mixed models because my websites have the same standard applications
and I
have to upgrade often these applications and the Django libs, so I can not
change the
models of every application and every Django installation in order to use "from
django_sqlalchemy import models" and fix all the custom fields. I think that
this is
the aim of the project: installation simple and backward compatible as possible.
This is in my settings.py file:
"""
DATABASE_ENGINE = 'django_sqlalchemy.backend'
DJANGO_SQLALCHEMY_DBURI = 'postgres://xxxxxxxx:xxxxxxxx@localhost/my_database'
#I use
prostgresql_psycopg2
INTSATTEL_APPS = (
'django_sqlalchemy',
...
)
"""
Is possible that I do something wrong, or that I misunderstand the aim of the
project. :/
Original comment by davide.m...@gmail.com
on 9 May 2008 at 12:20
Okay thanks for the explanation. That makes more sense. I'm actually working
on this piece right now. At the
moment you CANNOT use models that do not have the statement "from
django_sqlalchemy import models". As
soon as I get the work done that is the goal of the project.
Original comment by mtr...@gmail.com
on 10 May 2008 at 3:03
It's difficult to me understand well the new Djanto QuerySet because the
documentation lack, but I'm available to help you on doing something about this
feature.
In every case, thank you Mtrier.
Original comment by davide.m...@gmail.com
on 10 May 2008 at 8:40
Original issue reported on code.google.com by
davide.m...@gmail.com
on 7 May 2008 at 6:39