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

feat: show database backend in about modal #1576

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4251,6 +4251,13 @@ def get_build(request):
"""
BUILD = settings.BUILD
VERSION = settings.VERSION
default_db_engine = settings.DATABASES["default"]["ENGINE"]
if "postgresql" in default_db_engine:
database_type = "P"
elif "sqlite" in default_db_engine:
database_type = "S"
else:
database_type = "Unknown"

disk_info = get_disk_usage()

Expand All @@ -4265,7 +4272,9 @@ def get_build(request):
"Disk space": "Unable to retrieve disk usage",
}

return Response({"version": VERSION, "build": BUILD, **disk_response})
return Response(
{"version": VERSION, "build": BUILD, **disk_response, "database": database_type}
)


# NOTE: Important functions/classes from old views.py, to be reviewed
Expand Down
Loading