diff options
| author | Carlos Konstanski <carlos.konstanski@verizonwireless.com> | 2020-04-30 08:34:07 -0600 |
|---|---|---|
| committer | Carlos Konstanski <carlos.konstanski@verizonwireless.com> | 2020-04-30 08:34:07 -0600 |
| commit | 08203a6cb7889e55975d1568e9f4a9187fad8306 (patch) | |
| tree | 49ca07c8c2a44b213c0bfe23303bfbbda41d965a /src/orchestration/views.py | |
initial commit
Diffstat (limited to 'src/orchestration/views.py')
| -rw-r--r-- | src/orchestration/views.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/orchestration/views.py b/src/orchestration/views.py new file mode 100644 index 0000000..4c3910c --- /dev/null +++ b/src/orchestration/views.py @@ -0,0 +1,24 @@ +from django.shortcuts import render +from django.core import serializers +from django.http import HttpResponse, JsonResponse +from .models import ImageSync, RemoteRegionSetup + + +def index(request): + return HttpResponse("Hello world") + + +def count(request, count): + data = { + 'name': 'Vitor', + 'location': 'Finland', + 'is_active': True, + 'count': count + } + return JsonResponse(data) + + +def imagesync(request): + rec = ImageSync.objects.order_by('-remote_region_name') + return JsonResponse(serializers.serialize('json', rec), safe=False) + |
