Reputation: 168
Static file not found
I'm using Django 4.0.2, drf-yasg is 1.21.4 and django-rest-swagger 2.2.0
I have installed all of the above mentioned things and Swagger is working fine on my local system and everything working as expected.
But when I have pushed this code on the server (production) I'm getting a file not found error.
I have also attached a snapshot for the reference.
I tried a few things related to static file location like STATICFILES_DIRS and collectstatics but it's not working.
Also tried to changing the URLs and path but still getting the same error.
How can I resolve this issue?
Upvotes: 2
Views: 1101
Reputation: 1
You should install whitenoise, the problem will be solved
pip install whitenoise
you should check the documentation https://whitenoise.readthedocs.io/en/latest/
Upvotes: -1