add requirements and download json

This commit is contained in:
William Zhang 2018-05-08 16:54:26 -04:00
parent 38358d14db
commit 00e853bc93
7 changed files with 35 additions and 9 deletions

7
requirements.txt Normal file
View File

@ -0,0 +1,7 @@
certifi==2018.4.16
chardet==3.0.4
Django==2.0.5
idna==2.6
pytz==2018.4
requests==2.18.4
urllib3==1.22

View File

@ -5,5 +5,7 @@ from .views import *
urlpatterns = [
url(r'^$', index, name='index'),
url(r'about', about, name='about'),
url(r'resources', resources, name='resources'),
url(r'events', events, name='events'),
]

View File

@ -5,3 +5,9 @@ def index(request):
def about(request):
return render(request, "about.html")
def resources(request):
return render(request, "resources.html")
def events(request):
return render(request, "events.html")

View File

@ -1,12 +1,13 @@
<!DOCTYPE html>
<html>
{% load static %}
<head>
<link href="css/about.css" rel="stylesheet" />
{% include head.html %}
<link href="{% static 'css/about.css' %}" rel="stylesheet" />
{% include 'head.html' %}
<title>About - TJSGA</title>
</head>
<body>
{% include header.html %}
{% include 'header.html' %}
<div id="wrapper" class="fluid">
<section id="contact">
<h2>Contact Us!</h2>
@ -63,6 +64,6 @@
</section>
{% endfor %}
</div>
{% include footer.html %}
{% include 'footer.html' %}
</body>
</html>

View File

@ -19,8 +19,8 @@
<a class="menu-item" href="resources">
<button class="menu-item fluid">Resources</button>
</a>
<a class="menu-item" href="forms">
<button class="menu-item fluid">Forms</button>
<a class="menu-item" href="events">
<button class="menu-item fluid">Events</button>
</a>
</nav>
<div id="dome">

View File

@ -1,11 +1,12 @@
<!DOCTYPE html>
<html>
{% load static %}
<head>
{% include head.html %}
{% include 'head.html' %}
<title>Resources - TJSGA</title>
</head>
<body>
{% include header.html %}
{% include 'header.html' %}
<div id="wrapper" class="fluid">
<section id="resources">
<div class="list">
@ -84,6 +85,6 @@
</div>
</section>
</div>
{% include footer.html %}
{% include 'footer.html' %}
</body>
</html>

View File

@ -16,6 +16,15 @@ Including another URLconf
from django.conf.urls import include, url
from django.contrib import admin
from .apps.main import urls as main
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())
with open("forms.json", 'w') as f:
f.write(forms.json())
urlpatterns = [
url(r'^admin/', admin.site.urls),