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

admin ui #138

Open
swamirara opened this issue Apr 26, 2020 · 1 comment
Open

admin ui #138

swamirara opened this issue Apr 26, 2020 · 1 comment

Comments

@swamirara
Copy link

  • usable admin panel with Cassandra models

Issue is I am unable to apply auth migrations and could not create superuser to accces admin ui.

any sample code to to enable the admin UI? or do you have any plans to release admin auth module support?

BTW, thanks a lot for the awesome library.

@Saurabh-Singh-00
Copy link

This library doesn't supports auth migration but you can do a workaround like have a sql database just for auth migrations where you can override Django user model to use UUID or email as primary key and then use cassandra database with it. Hope this helps.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    },
    'cassandra': {
        'ENGINE': 'django_cassandra_engine',
        'NAME': 'todo',
        'HOST': '172.18.0.2',
        'USER': 'cassandra',
        'PASSWORD': 'cassandra',
        'OPTIONS': {
            'replication': {
                'strategy_class': 'SimpleStrategy',
                'replication_factor': 2
            },
            'connection': {
                'consistency': ConsistencyLevel.LOCAL_QUORUM,
                'lazy_connect': True,
                'retry_connect': True,
                'port': 9042,  # default port
            }
        }
    }
}

you can then create your superuser for admin database as usual

python manage.py createsuperuser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants