Search code examples
reactjsherokudjango-rest-framework

Setting debug=False with Django Rest Framework and React does not work


I have a project on which I use Django Rest Framework and React. I also use amazon s3 for static and file storage. The problem is that when I set debug=False in settings, there is nothing except white empyt page. Have you ever met this problem and what did you do to solve ? Thanks


Solution

  • I solved this problem. In settings.py there is a variable called "STATICFILES_STORAGE = 'storages.backends.s3boto3.S3StaticStorage'". I removed this and all static files uploaded to heroku but my media files run on amazon by the variable called DEFAULT_FILE_STORAGE'storages.backends.s3boto3.S3Boto3Storage'.