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

Feedback daan #6

Merged
merged 2 commits into from
Mar 19, 2024
Merged
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
15 changes: 3 additions & 12 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib.auth import logout
from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from django.urls import reverse
from django_filters.rest_framework import DjangoFilterBackend
Expand Down Expand Up @@ -137,12 +138,7 @@ def post(self, request):
)
full_url = request.build_absolute_uri(url)

return Response(
{
"message": f"Succesfully received the import taks request. Check {full_url} for the status of the import task."
},
status=status.HTTP_201_CREATED,
)
return HttpResponseRedirect(full_url)

return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

Expand Down Expand Up @@ -244,12 +240,7 @@ def post(self, request):
)
full_url = request.build_absolute_uri(url)

return Response(
{
"message": f"Succesfully received the upload taks request. Check {full_url} for the status of the import task."
},
status=status.HTTP_201_CREATED,
)
return HttpResponseRedirect(full_url)

return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

Expand Down