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

YB Backend for Django #7764

Closed
hbhanawat opened this issue Mar 23, 2021 · 0 comments
Closed

YB Backend for Django #7764

hbhanawat opened this issue Mar 23, 2021 · 0 comments
Labels
area/ecosystem Label for all ecosystem related projects kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@hbhanawat
Copy link
Contributor

hbhanawat commented Mar 23, 2021

Jira Link: DB-2224
This issue tracks task items related to YB backend for Django.

Task Items

Done Task GitHub Issue
⬜️ First draft of Django backend #7759
⬜️ Django test framework issue. Savepoint Support #7760
⬜️ Inet primary key mapping #7761
⬜️ Type change support #7762
⬜️ Document caveats #7763

Postgres Backend features not supported by YB backend

YB backend overrides Postgres backend for Django. The following are the features disabled for YB backend but supported by Postgres.

Feature GitHub Issue
allows_group_by_lob -
supports_deferrable_unique_constraints. #4700
uses_savepoints #1125
can_release_savepoints #1125
has_select_for_update_nowait #2742
has_select_for_update_skip_locked #2742
can_introspect_materialized_views -
can_rollback_ddl #1404
indexes_foreign_keys -
can_clone_databases -
supports_ignore_conflicts -
supports_collation_on_charfield #1127
supports_collation_on_textfield #1127
supports_non_deterministic_collations #1127
supports_tablespaces -
@hbhanawat hbhanawat added the area/ecosystem Label for all ecosystem related projects label Mar 23, 2021
hbhanawat pushed a commit to yugabyte/yb-django that referenced this issue Sep 16, 2021
Summary:
Try Django CMS app with our backend.

1. Get yb-django code changes in a folder. Say ~/code/yb-django
2. Ensure that you have started YB with disabled index backfilling otherwise it may take lot of time
	bin/yugabyted start --tserver_flags "ysql_disable_index_backfill=true,disable_index_backfill=true" --master_flags "ysql_disable_index_backfill=true,disable_index_backfill=true"
3. Create a virtual environment and install Django.
	$ pip install --upgrade virtualenv
	$ virtualenv env
	$ source env/bin/activate
	(env) $ pip install djangocms-installer
	(env) $ mkdir myproject && cd myproject
	(env) $ djangocms -f -p . my_demo
4. Update the DATABASES section in my_demo/settings.py to reflect this:
DATABASES = {
    'default': {
        'ENGINE': 'yb_backend',
        'NAME': 'yugabyte',
        'HOST': 'localhost',
        'PORT': 5433,
        'USER': 'yugabyte'
    }
}
5. Install the yb-django package in the virtual env.
	(env) $ python -m pip install -r ~/code/yb-django/requirements.txt
	(env) $ python -m pip install -e ~/code/yb-django/
	(env) $ pip list —local # check if it is installed correctly
6. Migrate the database and launch the server using the virtual env created earlier.
	(env) $ python manage.py migrate # this is the main step
	(env) $ python manage.py runserver

See https://github.com/django-cms/django-cms for details about the application.

Test Plan: Use Django CMS app and other Django apps for testing as the test suite is still not ready. See yugabyte/yugabyte-db#7764

Reviewers: skumar, nkumar, nikhil

Reviewed By: nikhil

Differential Revision: https://phabricator.dev.yugabyte.com/D11023
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ecosystem Label for all ecosystem related projects kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

2 participants