Forums

ERR_CONNECTION_REFUSED and Styling Error Using Django Rest Framework And React

Hi, I use React and Django Rest Framework and I have an issue with getting and sending data to backend. I get ERR_CONNECTION_REFUSED after sending requests. I've set ALLOWED_HOSTS to '*' and in CORS_ALLOWED_ORIGINS I've added link to my page. The error is shown in console. On the other hand django admin works. I have access to data and I can log in but... styling is not being loaded. Error message: Refused to apply style from [url] because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. I'm asking for help.

What do you mean by "The error is shown in console."? How do you run your web app? Do you follow https://help.pythonanywhere.com/pages/DeployExistingDjangoProject/?