Open gevonstria opened 5 years ago
Hello same error with initial project : NotImplementedError: UNKNOWN command not implemented for SQL SAVEPOINT "s3160_x2"
same error with initial project
NotImplementedError: UNKNOWN command not implemented for SQL SAVEPOINT
I solved it by downgrading my Django version from 2.2. to Django 2.0.
I solved it by downgrading my Django version from 2.2. to Django 2.0.
This worked for me as well
I am having the same error. Any news about how to fix it?
Just to know, is there a plan to solve this issue or should I downgrade as @gtria-abiliti mentions?
Changes in Django 2.2 include:
DatabaseFeatures.uses_savepoints now defaults to True.
So, features.py should include uses_savepoints = False
I tested it locally and it works, but I don't really know how to change a public library like this one. However, that seems to be the fix if anyone else who isn't scared to totally bork the library wants to toss that fix in.
This appears to be the same issue as #254
See issue #254. I've just downgraded Django to 2.1.8 for the time being. Man, I really want this package to remain viable. Mongo is a great pairing with Django :-)
started to work on Djang. Hope to learn a lot to fix things such like this using djang 2.1.8 too
@bverem Where was this line located and on what file??
features.py should include uses_savepoints = False
djongo/features.py
It appears that line has been added in a commit about a week ago.
Upgrade to git version with
pip install -U "git+https://github.com/nesdis/djongo"
I solved this by overriding the db backend.
Create a folder called db
in root app or any preferred location
in <defaultapp>/db/init.py
from djongo import *
in <defaultapp>/db/features.py
from djongo.features import DatabaseFeatures as DjongoDatabaseFeatures
class DatabaseFeatures(DjongoDatabaseFeatures):
uses_savepoints = False
in <defaultapp>/db/base.py
from djongo.base import DatabaseWrapper as DjongoDatabaseWrapper
from .features import DatabaseFeatures
class DatabaseWrapper(DjongoDatabaseWrapper):
features_class = DatabaseFeatures
Then change your db ENGINE
config to 'ENGINE': '<defaultapp>.db'
I solved this by overriding the db backend. Create a folder called
db
in root app or any preferred locationin
<defaultapp>/db/init.py
from djongo import *
in
<defaultapp>/db/features.py
from djongo.features import DatabaseFeatures as DjongoDatabaseFeatures class DatabaseFeatures(DjongoDatabaseFeatures): uses_savepoints = False
in
<defaultapp>/db/base.py
from djongo.base import DatabaseWrapper as DjongoDatabaseWrapper from .features import DatabaseFeatures class DatabaseWrapper(DjongoDatabaseWrapper): features_class = DatabaseFeatures
Then change your db
ENGINE
config to'ENGINE': '<defaultapp>.db'
What version(s) of Django does this work for? Since downgrading to 2.0 I've been hesitant to upgrade.
@Tisagh it works with 2.2
Creating a user via the terminal works well.
Creating a new user via the admin page yield the following error.
NotImplementedError at /admin/auth/user/add/
My versions: djongo 1.2 python 3.6