Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django compatibility #4054

Open
frafra opened this issue Mar 24, 2020 · 3 comments
Open

Django compatibility #4054

frafra opened this issue Mar 24, 2020 · 3 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@frafra
Copy link

frafra commented Mar 24, 2020

Jira Link: DB-2077
Hi!
as I use Django for many projects, I wanted to see if I could use YugabyteDB, so I decided to run the its test suite using YugabyteDB as a regular PostgresDB.

git clone --depth 1 https://github.com/django/django.git -b 3.0.4
cd django
cat << EOF > tests/test_yugabytedb.py
# Inspired by test_sqlite.py
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'postgres',
        'USER': 'postgres',
        'HOST': '127.0.0.1',
        'PORT': '5433',
    },
}
DATABASES['other'] = DATABASES['default']
SECRET_KEY = "django_tests_secret_key"
# Use a fast hasher to speed up tests.
PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.MD5PasswordHasher',
]
EOF
tox -e py3-postgres -- --settings=test_yugabytedb

Here is what I get at the moment:

django.db.utils.NotSupportedError: INDEX on column of type 'INET' not yet supported

Some competitors offer a custom Django backend, but it would be even cooler to be able to use Django together with YugabyteDB without having to rely on external libraries and retaining a strong compatibility with Postgres.

Is this related with #1113?

@yugabyte-ci yugabyte-ci added the community/request Issues created by external users label Mar 24, 2020
@ddorian
Copy link
Contributor

ddorian commented Mar 24, 2020

hi @frafra

Running the test suite there are these issues:

Adding a custom driver seems interesting. It may not support all features but won't be blocking.

@ddorian ddorian added the area/ysql Yugabyte SQL (YSQL) label Mar 24, 2020
@rkarthik007
Copy link
Collaborator

I decided to run the its test suite using YugabyteDB as a regular PostgresDB.

Thats an interesting approach! We should definitely shoot for that in the longer run. But more immediately, we may try to unblock the more common usage patterns of Django, for example the one regarding deferred foreign key, which comes up more commonly.

@rajaiswal
Copy link

rajaiswal commented Apr 17, 2020

django.db.utils.NotSupportedError: DEFERRABLE constraint not supported yet
LINE 1: ...type_id") REFERENCES "django_content_type" ("id") DEFERRABLE...
                                                             ^
HINT:  See https://github.com/YugaByte/yugabyte-db/issues/1129. Click '+' on the description to raise its priority

Linking the DEFERRABLE constraint error here mentioned in #1129 and #3987 so we can keep all Django related issues in one place.

@rkarthik007 rkarthik007 added the kind/new-feature This is a request for a completely new feature label Jun 5, 2020
@yugabyte-ci yugabyte-ci added the priority/medium Medium priority issue label Jun 9, 2022
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed kind/new-feature This is a request for a completely new feature labels Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
Status: No status
Development

No branches or pull requests

8 participants