feat: admin panel enrichment

This commit is contained in:
mohamad
2026-07-19 14:31:28 +03:30
parent d8d7819eca
commit 1042fba121
77 changed files with 4616 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
from django.conf import settings
def enabled_social_providers():
providers = []
configured = getattr(settings, "SOCIALACCOUNT_PROVIDERS", {})
labels = {
"google": "Google",
"github": "GitHub",
}
for provider_id, label in labels.items():
app = configured.get(provider_id, {}).get("APP", {})
if app.get("client_id") and app.get("secret"):
providers.append({"id": provider_id, "label": label})
return providers