CodeForAfrica / sensors.AFRICA-api

The sensors.AFRICA API receiving, storing, and processing data received from sensors across the continentent. Accessible at https://api.sensors.africa/
https://api.sensors.africa/
18 stars 7 forks source link

Fix Static Templates Not Found #15

Closed karimkawambwa closed 5 years ago

karimkawambwa commented 5 years ago

Description

Fix the addsensor html page not found by fixing the path of the templates directory for sensorsafrica. Additionally, introduced whitenoise to compress and serve static files.

Moreover, this fixes the path the the templates folder which seems to not work without specifying it in TEMPLATES DIRS.

Type of change

Checklist:

karimkawambwa commented 5 years ago

@kilemensi

Explain it a bit... Looking at default WhiteNoise docs, you seem to be adding a bit more that the minimum required to make it work.

This additionally fixes the path to the templates folder which seems to not work without specifying it in TEMPLATES DIRS.