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

Add django-prometheus DB backends support #1800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mounirmesselmeni
Copy link
Contributor

List of backends provided by django-prometheus:

https://github.com/korfuri/django-prometheus/tree/master/django_prometheus/db/backends

This will fix the issue of not being able to reset_db as the backend is unknown.

A workaround I was using in settings.py it the following:

if 'reset_db' not in sys.argv:
    DATABASES['default']['ENGINE'] = DATABASES['default']['ENGINE'].replace(
        'django.db.backends', 'django_prometheus.db.backends'
    )

List of backends provided by django-prometheus:

https://github.com/korfuri/django-prometheus/tree/master/django_prometheus/db/backends

This will fix the issue of not being able to reset_db as the backend is unknown.

A workaround I was using in `settings.py` it the following:

```python
if 'reset_db' not in sys.argv:
    DATABASES['default']['ENGINE'] = DATABASES['default']['ENGINE'].replace(
        'django.db.backends', 'django_prometheus.db.backends'
    )
```
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

Successfully merging this pull request may close these issues.

None yet

1 participant