mirror of
https://github.com/tjsga/website-2018.git
synced 2025-04-16 01:00:17 -04:00
add requirements and download json
This commit is contained in:
parent
38358d14db
commit
00e853bc93
7
requirements.txt
Normal file
7
requirements.txt
Normal 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
|
|
@ -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'),
|
||||
|
||||
]
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user