whitenoise

Django Whitenoise 500 server error in non debug mode

倾然丶 夕夏残阳落幕 提交于 2021-02-19 03:28:10
问题 I am using django in my local machine. In order to serve the static files I used WhiteNoise along with it. When DEBUG = True all static files are correctly served. But when I changed DEBUG = False and set ALLOWED_HOSTS = ['*'] I'm getting 500 server error. However admin site loads without any error. Also when I comment out STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' I don't get 500 error. I followed the documentation given in http://whitenoise.evans.io/en

Whenever debug=False in django, Heroku gives Server Error (500) and when debug=True no error

人盡茶涼 提交于 2021-01-01 08:03:03
问题 When I set debug = False I get error 500 but when it is set to True I don't get any error. I tried :- "heroku run python manage.py collectstatic" "commenting out whitenoise" "changing template and static and staticfiles locations" "COMPRESS_ENABLED = os.environ.get('COMPRESS_ENABLED', False)" "allowing everything in domain" """ Django settings for sites project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en

Whenever debug=False in django, Heroku gives Server Error (500) and when debug=True no error

£可爱£侵袭症+ 提交于 2021-01-01 08:00:50
问题 When I set debug = False I get error 500 but when it is set to True I don't get any error. I tried :- "heroku run python manage.py collectstatic" "commenting out whitenoise" "changing template and static and staticfiles locations" "COMPRESS_ENABLED = os.environ.get('COMPRESS_ENABLED', False)" "allowing everything in domain" """ Django settings for sites project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en

Whenever debug=False in django, Heroku gives Server Error (500) and when debug=True no error

百般思念 提交于 2021-01-01 08:00:06
问题 When I set debug = False I get error 500 but when it is set to True I don't get any error. I tried :- "heroku run python manage.py collectstatic" "commenting out whitenoise" "changing template and static and staticfiles locations" "COMPRESS_ENABLED = os.environ.get('COMPRESS_ENABLED', False)" "allowing everything in domain" """ Django settings for sites project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en

Django doesn't load static files ValueError(“Missing staticfiles manifest entry for '%s'” % clean_name)

限于喜欢 提交于 2020-12-10 08:47:39
问题 is my first app in Django and I am trying to prepare my Django (2.0) application for production, but I am unable to make the static files load properly using WhiteNoise I keep having all the time the next error in my log ValueError("Missing staticfiles manifest entry for '%s'" % clean_name) ValueError: Missing staticfiles manifest entry for 'css/inicio.css' [02/Jun/2018 14:40:37] ERROR [django.server:124] "GET /participation/prueba HTTP/1.1" 500 27 I have the following settings.py ... DEBUG

Django: Whitenoise not working in production with debug false

橙三吉。 提交于 2020-08-09 09:32:07
问题 I have a Django app with whitenoise for static files. But when I test the app with Google Lighthouse I get asked to enable text compression for my static .js and .css files. I read a lot of related posts but couldn´t find an answer. I also followed Heroku´s guide to implement it. https://devcenter.heroku.com/articles/django-assets Settings BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'whitenoise

Django ValueError: Missing staticfiles manifest entry, but the manifest appears to show the entry

为君一笑 提交于 2020-01-05 08:29:16
问题 On a Django 1.11 app deployed to Heroku. When loading the root URL / (and I presume when Django gets to {% static 'angular/angular.min.js' %} in the homepage.html template) I get the following error: ValueError: Missing staticfiles manifest entry for 'angular/angular.min.js' File "django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File