Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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'
    )
```
@trbs trbs merged commit a6f4e3b into django-extensions:main Apr 5, 2025
12 checks passed
@trbs
Copy link
Member

trbs commented Apr 5, 2025

Thanks !

@mounirmesselmeni mounirmesselmeni deleted the patch-2 branch April 7, 2025 14:07
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.

2 participants