From cb0774c8a31d1c90936d4f2d9d82f58362213d2e Mon Sep 17 00:00:00 2001 From: Steve Yonkeu Date: Wed, 11 Oct 2023 01:00:25 +0000 Subject: [PATCH] fix: fixes the theme error (#859) * fix: fixes the theme error * refactor: rename theme to default --- zubhub_backend/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/zubhub_backend/Makefile b/zubhub_backend/Makefile index 05b72af3b..c19a26416 100644 --- a/zubhub_backend/Makefile +++ b/zubhub_backend/Makefile @@ -107,7 +107,17 @@ admin-user: docker-compose -f docker-compose.yml exec web bash -c "rm /dummy.sh" .PHONY: admin-user -init: .env start migrate admin-user ## Initialize docker-compose containers +add-theme: + @echo "===" + @echo "== Add a theme to the database ==" + @echo "===" + docker-compose -f docker-compose.yml exec web bash -c "echo 'echo \"from zubhub.models import Theme; \ + Theme.objects.create(Theme_Name=\\\"Default\\\", status=\\\"1\\\") if not Theme.objects.filter(Theme_Name=\\\"Default\\\").exists() else None\" | python /zubhub_backend/zubhub/manage.py shell' > /theme.sh" + docker-compose -f docker-compose.yml exec web bash /theme.sh + docker-compose -f docker-compose.yml exec web bash -c "rm /theme.sh" +.PHONY: add-theme + +init: .env start migrate admin-user add-theme ## Initialize docker-compose containers .PHONY: init search-index: