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

paul #43

Merged
merged 1 commit into from
Nov 27, 2023
Merged

paul #43

Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion smartreport/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,10 @@
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
EMAIL_USE_SSL = True


DEFAULT_FILE_STORAGE = 'django_storage_supabase.supabase'
SUPABASE_API_KEY = os.environ.get('SUPABASE_ANON_KEY')
SUPABASE_URL = "https://khjwjcfckbsfpvdmcrak.supabase.co"
SUPABASE_ROOT_PATH = '/smartreports/'
4 changes: 4 additions & 0 deletions smartreport_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def __init__(self, **kwargs: Any) -> None:

def list(self, request):
params = request.query_params

if 'kpis' not in params or params.getlist("kpis") == []:
return Response({"message": "The required parameter 'kpis' is missing"}, status=status.HTTP_400_BAD_REQUEST)

list_of_internal_ids = params.getlist("kpis")[0].split(',') # list of kpis to show in the plot

queryset = Kpi.objects.filter(id__in=list_of_internal_ids)
Expand Down
Loading