Skip to content

Instantly share code, notes, and snippets.

@a-toms
Created September 14, 2023 17:15
Show Gist options
  • Save a-toms/364cadfd6d2855742278c6380a7efe87 to your computer and use it in GitHub Desktop.
Save a-toms/364cadfd6d2855742278c6380a7efe87 to your computer and use it in GitHub Desktop.
python
# sim/views.py
from django.shortcuts import render
from django.http import JsonResponse
import requests
def dashboard(request):
return render(request, 'dashboard.html')
def process_task(request):
# We will update this view later with a link to our serverless function.
return JsonResponse({'status': 'success'})
def save_result(request):
# We will update this view later to save the result data.
print("Task completed! Time to save the data to our database.")
return JsonResponse({'status': 'success'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment