mirror of
https://github.com/tjsga/website-2018.git
synced 2025-04-16 01:00:17 -04:00
fix urls.py
This commit is contained in:
parent
97c1c8f89c
commit
167b66a9ab
|
@ -14,21 +14,21 @@ Including another URLconf
|
|||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf.urls import include, url
|
||||
from django.views.generic.simple import direct_to_template
|
||||
from django.views.generic import TemplateView
|
||||
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:
|
||||
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(str(about.json()[0]))
|
||||
with open("forms.json", 'w') as f:
|
||||
with open('forms.json', 'w') as f:
|
||||
f.write(str(forms.json()[0]))
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^', include(main)),
|
||||
url(r'^robots\.txt$', direct_to_template, {'template': 'robots.txt', 'mimetype': 'text/plain'})
|
||||
url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt'), name='robots.txt')
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user