From 5b33ef03cc690ce5a760921c2811eaa49e41ff01 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Tue, 8 May 2018 16:58:52 -0400 Subject: [PATCH] working download --- .gitignore | 1 + sgawebsite/urls.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cafcd51..5223a9b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ config.py settings.py env/ db.sqlite3 +*.json diff --git a/sgawebsite/urls.py b/sgawebsite/urls.py index 089887e..6ca7066 100644 --- a/sgawebsite/urls.py +++ b/sgawebsite/urls.py @@ -21,9 +21,9 @@ import requests about = requests.get("https://sgawebsite-e30e2.firebaseio.com/about.json") forms = requests.get("https://sgawebsite-e30e2.firebaseio.com/forms.json") with open("about.json", 'w') as f: - f.write(about.json()) + f.write(str(about.json()[0])) with open("forms.json", 'w') as f: - f.write(forms.json()) + f.write(str(forms.json()[0])) urlpatterns = [