Skip to content

Commit

Permalink
Merge c270d3e into 8e9adc4
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Jan 11, 2019
2 parents 8e9adc4 + c270d3e commit fb8cdd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion masonite/providers/WhitenoiseProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from whitenoise import WhiteNoise

from masonite.provider import ServiceProvider
from config import application


class WhitenoiseProvider(ServiceProvider):
Expand All @@ -15,7 +16,7 @@ def register(self):
def boot(self):
"""Wrap the WSGI server in a whitenoise container."""
self.app.bind('WSGI', WhiteNoise(
self.app.make('WSGI'), root=self.app.make('Application').STATIC_ROOT))
self.app.make('WSGI'), root=self.app.make('Application').STATIC_ROOT, autorefresh=application.DEBUG))

for location, alias in self.app.make('Storage').STATICFILES.items():
self.app.make('WSGI').add_files(location, prefix=alias)

0 comments on commit fb8cdd2

Please sign in to comment.