Skip to content

Commit a50bd39

Browse files
IsaacIsaac
Isaac
authored and
Isaac
committed
everything working except geocoder
1 parent 348c6f9 commit a50bd39

File tree

830 files changed

+74884
-6802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

830 files changed

+74884
-6802
lines changed

Pipfile.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/MATchMapper/settings.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
TEMPLATES = [
7171
{
7272
'BACKEND': 'django.template.backends.django.DjangoTemplates',
73-
'DIRS': [],
73+
'DIRS': [os.path.join(BASE_DIR, "templates")],
7474
'APP_DIRS': True,
7575
'OPTIONS': {
7676
'context_processors': [
@@ -149,6 +149,13 @@
149149

150150
STATIC_URL = '/static/'
151151

152+
# STATICFILES_DIRS = [
153+
# # Tell Django where to look for React's static files (css, js)
154+
# os.path.join(BASE_DIR, "templates/static"),
155+
# ]
156+
157+
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
158+
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
152159
CORS_ORIGIN_ALLOW_ALL = False
153160
CORS_ORIGIN_WHITELIST = (
154161
'http://localhost:8081',

database/MATchMapper/urls.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,24 @@
1515
"""
1616
import os
1717
from django.contrib import admin
18-
from django.urls import path, include
18+
from django.urls import path, include, re_path
1919
from django.conf.urls import url
20+
from django.shortcuts import render
2021
from bupehandler import views
2122

2223
from django.views.decorators.cache import cache_page
2324
cache_duration = 60
2425

26+
def render_react(request):
27+
return render(request, "index.html")
28+
2529
urlpatterns = [
26-
path('', views.about_page, name="about_page"),
30+
path(r"", render_react),
2731
path('admin/', admin.site.urls),
2832
url('api-auth/', include('rest_framework.urls')),
2933
url('api/', include('bupehandler.urls')),
30-
url(r'^table/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)/(?P<keyword>.+)$', views.filtered_table, name="filtered_table"),
31-
url(r'^table/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)$', views.filtered_table, name="filtered_table"),
32-
url(r'^table/(?P<table_name>.+)/(?P<param_values>.+)/$', views.filtered_table, name="filtered_table"),
33-
url(r'^table/(?P<table_name>.+)/$',views.filtered_table, name = "filtered_table"),
34-
url(r'^map/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)/(?P<keyword>.+)$', views.filtered_map, name="filtered_map"),
35-
url(r'^map/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)$', views.filtered_map, name="filtered_map"),
36-
url(r'^map/(?P<table_name>.+)/(?P<param_values>.+)/$', views.filtered_map, name="filtered_map"),
37-
url(r'^map/(?P<table_name>.+)/$', views.filtered_map, name="filtered_map"),
34+
re_path(r"table\/", render_react),
35+
re_path(r"map\/", render_react),
3836
url(r'^headless/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)/(?P<keyword>.+)$', views.headless_query, name="headless"),
3937
url(r'^headless/(?P<table_name>.+)/(?P<param_values>.+)/(?P<excluded_values>.+)$', views.headless_query, name="headless"),
4038
url(r'^headless/(?P<table_name>.+)/(?P<param_values>.+)/$', views.headless_query, name="headless"),

database/bupehandler/static/css/main.6b17a85d.chunk.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)