Use whitenoise for serving static files

The usage of static files in the ARA API server is very limited.
They are used for displaying the API browser from django-rest-framework
and the Django admin interface.

By using whitenoise, Django can serve static files through "manage.py
runserver" and through the WSGI application without needing to enable
debug mode or adding specific routes.

This allows us to simplify the deployment a bit because we no longer
need to collect static files.
We're also taking this opportunity to simplify configuration a bit by no
longer exposing the following configuration options:

- STATIC_ROOT
- STATIC_URL
- MEDIA_ROOT
- MEDIA_URL

They'll still be loaded but there is no longer a use case for being able
to change the defaults -- at least for the time being.

Change-Id: I9fc853e84b3739fca574afcd2da799dc8c1fbad6
This commit is contained in:
David Moreau Simard
2019-03-06 09:43:56 -05:00
parent 63d0120ae2
commit 3b6b291967
11 changed files with 17 additions and 79 deletions

View File

@@ -6,3 +6,4 @@ django-cors-headers
django-filter
dynaconf[yaml]
requests>=2.14.2
whitenoise