Created
November 10, 2019 15:25
-
-
Save alysedunn/ac648f070c548a8dfe3ca22f55fa6288 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import boto3 | |
from django import forms | |
from django.shortcuts import render | |
from django.template import loader | |
from django.http import HttpResponse | |
from sodapy import Socrata | |
from .forms import FacilityForm | |
boto3.setup_default_session(region_name='us-east-1') | |
AWS_DEFAULT_REGION = 'us-east-1' | |
AWS_ACCESS_KEY_ID = '' | |
AWS_SECRET_ACCESS_KEY = '' | |
MEDICARE_CLIENT = Socrata("data.medicare.gov", "") | |
DYNAMO_CLIENT = boto3.client( | |
'dynamodb', | |
aws_access_key_id=AWS_ACCESS_KEY_ID, | |
aws_secret_access_key=AWS_SECRET_ACCESS_KEY | |
) | |
def index(request): | |
""" | |
Homepage displaying checklist | |
:param request: | |
:return: | |
""" | |
# template = loader.get_template('index.html') | |
# context = {} | |
# return HttpResponse(template.render(context, request)) | |
pass | |
def facility_search(request): | |
""" | |
Facility search page allowing users to search for facilities with specific features, e.g. size, yelp rating, | |
e.t.c. Note that this method calls the external Yelp and Medicare APIs. | |
:param request: | |
:return: | |
""" | |
if request.method == 'POST': | |
form = FacilityForm(request.POST) | |
if form.is_valid(): | |
return HttpResponseRedirect('/thanks/') | |
else: | |
form = FacilityForm() | |
return render(request, 'facility_search.html', {'form': form}) | |
def attorney_search(request): | |
""" | |
Facility search page allowing users to search for facilities with specific features, e.g. size, yelp rating, | |
e.t.c. Note that this method calls the external Avro API. | |
:param request: | |
:return: | |
""" | |
pass | |
def physician_resources(request): | |
""" | |
Static page with physician resources | |
:param request: | |
:return: | |
""" | |
pass | |
def caregiver_helper_resources(request): | |
""" | |
Static page with resources to find non-skilled helpers | |
:param request: | |
:return: | |
""" | |
pass | |
def accountant_resources(request): | |
""" | |
Static page with accounting resources | |
:param request: | |
:return: | |
""" | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment