-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from JJtan2002/settings
Settings
- Loading branch information
Showing
6 changed files
with
79 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,4 +176,25 @@ def put(self, request): | |
|
||
|
||
return JsonResponse({"message": "This is setProfile view"}) | ||
|
||
|
||
|
||
@api_view(['POST']) | ||
@permission_classes([AllowAny]) | ||
def feedback(request): | ||
subject = request.data.get('subject') | ||
content = request.data.get('content') | ||
|
||
send_mail( | ||
f'Feedback from CashFlow: {subject}', | ||
f'Dear Developer, below is the feedback from CashFlow user:\n\n{content}\n', | ||
settings.DEFAULT_FROM_EMAIL, | ||
['[email protected]', '[email protected]'], | ||
fail_silently=False, | ||
) | ||
|
||
return JsonResponse({ | ||
'success': 'true', | ||
'message': 'Feedback sent', | ||
}, status=200) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters