evansd / whitenoise

Radically simplified static file serving for Python web apps
https://whitenoise.readthedocs.io
MIT License
2.55k stars 152 forks source link

WhiteNoise fails on missing file (that's there) #126

Closed paulnicholsen27 closed 7 years ago

paulnicholsen27 commented 7 years ago

When I enable WhiteNoise locally (added middleware, and STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage') but when I run collectstatic I get the error that The CSS file 'css/business-casual.css' references a file which could not be found: staticfiles/img/clouds.jpg. The file is definitely there (my css has a relative path to its storage spot in my staticfiles directory... I'm pretty sure I did it right). Removing the staticfiles_storage fixes it locally although I'm still having trouble deploying it to heroku. Not sure if the errors are related or not

evansd commented 7 years ago

Have you tried swapping the STATICFILES_STORAGE backend as described here? http://whitenoise.evans.io/en/stable/django.html#troubleshooting-the-whitenoise-storage-backend

paulnicholsen27 commented 7 years ago

Same error either way. Thanks, back to the drawing board. (Any ideas? I've been fighting this for a week).

On Wed, Feb 22, 2017 at 1:43 PM, Dave Evans notifications@github.com wrote:

Have you tried swapping the STATICFILES_STORAGE backend as described here? http://whitenoise.evans.io/en/stable/django.html#troubleshooting-the- whitenoise-storage-backend

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evansd/whitenoise/issues/126#issuecomment-281762147, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-fSGd1j3q1xXx_lJnkGCsoIVWRDtFnks5rfIHpgaJpZM4MIFTr .

evansd commented 7 years ago

That's frustrating. If you can post a copy of your static files somewhere I can take a look. If I had to guess I'd say it's something to do with django-compress but it's hard to know without seeing the set up.

paulnicholsen27 commented 7 years ago

I'm almost certain it's django-compress but I'm stumped. I actually solved the original error by moving some files around (not sure why that worked, but it did). I'm still getting 500 Server Error on prod though, and I have no idea why.

Here's the repo--if you had the chance to take a look I'd greatly appreciate it and would recommend you to all my friends and neighbors. https://github.com/paulnicholsen27/within_reach

Here's the error log that gets emailed to me:

Internal Server Error: /

OfflineGenerationError at /
You have offline compression enabled but key "dd5d84039c40ca1726a66b18a1fc4b8d" is missing from offline manifest. You may need to run "python manage.py compress".

Request Method: GET
Request URL: http://www.withinreachgroup.com/
Django Version: 1.9.6
Python Executable: /app/.heroku/python/bin/python
Python Version: 2.7.13
Python Path: ['/app', '/app/.heroku/python/bin', '/app', '/app/.heroku/python/lib/python27.zip', '/app/.heroku/python/lib/python2.7', '/app/.heroku/python/lib/python2.7/plat-linux2', '/app/.heroku/python/lib/python2.7/lib-tk', '/app/.heroku/python/lib/python2.7/lib-old', '/app/.heroku/python/lib/python2.7/lib-dynload', '/app/.heroku/python/lib/python2.7/site-packages', '/app/.heroku/python/lib/python2.7/site-packages/setuptools-32.1.0-py2.7.egg', '/app/.heroku/python/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg']
Server time: Thu, 23 Feb 2017 01:21:46 +0000
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'ckeditor',
 'ckeditor_uploader',
 'compressor',
 'mainsite',
 'common',
 'blog',
 'django_social_share',
 'captcha',
 'django_extensions']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  174.                     response = self.process_exception_by_middleware(e, request)

File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  172.                     response = response.render()

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py" in render
  160.             self.content = self.rendered_content

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  137.         content = template.render(context, self._request)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/backends/django.py" in render
  95.             return self.template.render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  206.                     return self._render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  173.         return compiled_parent._render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/app/.heroku/python/lib/python2.7/site-packages/compressor/templatetags/compress.py" in render
  127.         return self.render_compressed(context, self.kind, self.mode, forced=forced)

File "/app/.heroku/python/lib/python2.7/site-packages/compressor/templatetags/compress.py" in render_compressed
  86.             return self.render_offline(context)

File "/app/.heroku/python/lib/python2.7/site-packages/compressor/templatetags/compress.py" in render_offline
  71.                 'You may need to run "python manage.py compress".' % key)

Exception Type: OfflineGenerationError at /
Exception Value: You have offline compression enabled but key "dd5d84039c40ca1726a66b18a1fc4b8d" is missing from offline manifest. You may need to run "python manage.py compress".
Request information:
GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
HTTP_X_FORWARDED_PROTO = 'http'
wsgi.input = <gunicorn.http.body.Body object at 0x7fa334c4d550>
wsgi.version =
HTTP_ACCEPT_ENCODING = 'gzip,deflate,br'
wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fa334c4d610>
REMOTE_ADDR = '10.69.198.55'
PATH_INFO = u'/'
wsgi.multithread = False
wsgi.multiprocess = True
RAW_URI = '/'
SERVER_PROTOCOL = 'HTTP/1.1'
HTTP_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_HOST = 'www.withinreachgroup.com'
gunicorn.socket = <socket._socketobject object at 0x7fa334ca8830>
wsgi.run_once = False
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon'
QUERY_STRING = ''
wsgi.url_scheme = 'http'
HTTP_TOTAL_ROUTE_TIME = '0'
REMOTE_PORT = '55324'
HTTP_X_REQUEST_START = '1487812903073'
wsgi.file_wrapper = ''
SERVER_SOFTWARE = 'gunicorn/19.6.0'
HTTP_X_REQUEST_ID = '2280c192-e7d9-4f17-87c4-893431dc4869'
HTTP_CONNECT_TIME = '0'
REQUEST_METHOD = 'GET'
SERVER_PORT = '46641'
HTTP_X_FORWARDED_FOR = '2601:14d:8300:fa17:3df3:e642:6096:706e, 66.249.83.192'
SCRIPT_NAME = u''
HTTP_VIA = '1.1 vegur'
HTTP_CONNECTION = 'close'
SERVER_NAME = '0.0.0.0'
HTTP_X_FORWARDED_PORT = '80'

Settings:
Using settings module withinreach.settings
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
PASSWORD_RESET_TIMEOUT_DAYS = u'********************'
SECURE_HSTS_SECONDS = 0
CSRF_COOKIE_DOMAIN = '.withinreachgroup.com'
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
PREPEND_WWW = False
LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
FILE_UPLOAD_TEMP_DIR = None
SESSION_SAVE_EVERY_REQUEST = False
TEMPLATE_DEBUG = False
DJANGO_SECRET_KEY = u'********************'
STATIC_URL = '/staticfiles/'
COMPRESS_REBUILD_TIMEOUT = 2592000
WSGI_APPLICATION = 'withinreach.wsgi.application'
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
COMPRESS_CSS_COMPRESSOR = u'compressor.css.CssCompressor'
USE_X_FORWARDED_PORT = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
EMAIL_SUBJECT_PREFIX = '[Django] '
COMPRESS_YUI_BINARY = u'java -jar yuicompressor.jar'
COMPRESS_JINJA2_GET_ENVIRONMENT = <function JINJA2_GET_ENVIRONMENT at 0x7fa3358ee410>
SILENCED_SYSTEM_CHECKS = []
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
LANGUAGE_COOKIE_NAME = 'django_language'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
EMAIL_TIMEOUT = None
THOUSAND_SEPARATOR = ','
SETTINGS_MODULE = 'withinreach.settings'
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
LANGUAGE_COOKIE_AGE = None
EMAIL_USE_TLS = True
USE_L10N = True
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
USE_ETAGS = False
ABSOLUTE_URL_OVERRIDES = {}
COMPRESS_DATA_URI_MAX_SIZE = 1024
LOGGING = {}
ALLOWED_INCLUDE_ROOTS = []
COMPRESS_MTIME_DELAY = 10
MEDIA_ROOT = '/app/media/'
MONTH_DAY_FORMAT = 'F j'
COMPRESS_JS_FILTERS = [u'compressor.filters.jsmin.JSMinFilter']
CKEDITOR_UPLOAD_PATH = 'uploads/'
USE_X_FORWARDED_HOST = False
COMPRESS_VERBOSE = False
SESSION_COOKIE_AGE = 1209600
EMAIL_SSL_CERTFILE = None
CSRF_COOKIE_PATH = '/'
COMPRESS_CACHE_KEY_FUNCTION = u'********************'
ADMINS = [('Paul Nicholsen', 'paulnicholsen27@gmail.com')]
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
MIDDLEWARE_CLASSES = ['django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
COMPRESS_MINT_DELAY = 30
PASSWORD_HASHERS = u'********************'
SHORT_DATE_FORMAT = 'm/d/Y'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {u'STATIC_URL': '/staticfiles/'}
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SECURE_SSL_HOST = None
SERVER_EMAIL = 'root@localhost'
DEBUG = False
NUMBER_GROUPING = 0
COMPRESS_YUGLIFY_CSS_ARGUMENTS = u'--terminal'
CACHE_MIDDLEWARE_SECONDS = 600
MIGRATION_MODULES = {}
CSRF_COOKIE_AGE = 31449600
CSRF_TRUSTED_ORIGINS = []
SESSION_COOKIE_HTTPONLY = True
STATIC_ROOT = '/app/staticfiles'
COMPRESS_CLEAN_CSS_BINARY = u'cleancss'
SECURE_SSL_REDIRECT = False
COMPRESS_OUTPUT_DIR = u'CACHE'
FILE_UPLOAD_PERMISSIONS = None
CACHE_MIDDLEWARE_ALIAS = 'default'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
COMPRESS_YUGLIFY_JS_ARGUMENTS = u'--terminal'
FIRST_DAY_OF_WEEK = 0
DEFAULT_TABLESPACE = ''
DATE_FORMAT = 'N j, Y'
DEFAULT_CONTENT_TYPE = 'text/html'
INTERNAL_IPS = []
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEBUG_PROPAGATE_EXCEPTIONS = False
COMPRESS_CLEAN_CSS_ARGUMENTS = u''
COMPRESS_CACHE_BACKEND = u'default'
DEFAULT_FROM_EMAIL = 'paulnicholsen27@gmail.com'
FIXTURE_DIRS = []
ROOT_URLCONF = 'withinreach.urls'
COMPRESS_CLOSURE_COMPILER_BINARY = u'java -jar compiler.jar'
TEMPLATE_CONTEXT_PROCESSORS = ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages']
CKEDITOR_UPLOAD_SLUGIFY_FILENAME = False
USE_TZ = True
COMPRESS_YUGLIFY_BINARY = u'yuglify'
EMAIL_PORT = 587
LOGIN_REDIRECT_URL = '/accounts/profile/'
COMPRESS_URL = '/staticfiles/'
CSRF_COOKIE_NAME = 'csrftoken'
FORMAT_MODULE_PATH = None
IGNORABLE_404_URLS = []
TEMPLATE_DIRS = []
AUTH_USER_MODEL = 'auth.User'
LOCALE_PATHS = []
YEAR_MONTH_FORMAT = 'F Y'
EMAIL_USE_SSL = False
CACHE_MIDDLEWARE_KEY_PREFIX = u'********************'
SECURE_PROXY_SSL_HEADER = None
DATETIME_FORMAT = 'N j, Y, P'
STATICFILES_FINDERS =
COMPRESS_CACHEABLE_PRECOMPILERS =
COMPRESS_PRECOMPILERS = ('text/x-scss', 'django_libsass.SassCompiler')
COMPRESS_ENABLED = True
COMPRESS_YUI_JS_ARGUMENTS = u''
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
TEST_NON_SERIALIZED_APPS = []
USE_I18N = True
DEFAULT_CHARSET = 'utf-8'
COMPRESS_CSS_HASHING_METHOD = u'mtime'
EMAIL_HOST = 'smtp.gmail.com'
COMPRESS_OFFLINE_CONTEXT = {u'STATIC_URL': '/staticfiles/'}
SESSION_COOKIE_SECURE = False
EMAIL_HOST_PASSWORD = u'********************'
EMAIL_HOST_USER = 'paulnicholsen27@gmail.com'
SESSION_FILE_PATH = None
EMAIL_SSL_KEYFILE = u'********************'
DATABASES = {'default': {'USER': 'hukhkztpxzcctb', 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'OPTIONS': {}, 'NAME': 'dfkv8obv2l0k7m', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'TIME_ZONE': None, 'CONN_MAX_AGE': 500, 'PASSWORD': u'********************', 'TEST': {'NAME': None, 'MIRROR': None, 'COLLATION': None, 'CHARSET': None}, 'PORT': 5432, 'HOST': 'ec2-54-225-67-3.compute-1.amazonaws.com'}}
TEMPLATES = [{'OPTIONS': {'loaders': ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', 'django.template.loaders.eggs.Loader'), 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', 'mainsite.context_processors.google_api']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/app/templates']}]
SESSION_COOKIE_NAME = 'sessionid'
INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'ckeditor', 'ckeditor_uploader', 'compressor', 'mainsite', 'common', 'blog', 'django_social_share', 'captcha', 'django_extensions']
SHORT_DATETIME_FORMAT = 'm/d/Y P'
LOGOUT_URL = '/accounts/logout/'
BASE_DIR = '/app'
SESSION_CACHE_ALIAS = 'default'
COMPRESS_YUI_CSS_ARGUMENTS = u''
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
SECURE_BROWSER_XSS_FILTER = False
DATABASE_ROUTERS = []
LANGUAGE_CODE = 'en-us'
SECURE_REDIRECT_EXEMPT = []
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
CSRF_COOKIE_SECURE = False
LANGUAGE_COOKIE_DOMAIN = None
SESSION_COOKIE_DOMAIN = None
FILE_CHARSET = 'utf-8'
FORCE_SCRIPT_NAME = None
SECRET_KEY = u'********************'
APPEND_SLASH = True
COMPRESS_PARSER = u'compressor.parser.AutoSelectParser'
TEMPLATE_LOADERS = ['django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader']
DISALLOWED_USER_AGENTS = []
CSRF_COOKIE_HTTPONLY = True
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
STATICFILES_DIRS = []
MEDIA_URL = '/media/'
CKEDITOR_IMAGE_BACKEND = 'pillow'
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
DECIMAL_SEPARATOR = '.'
TIME_ZONE = 'UTC'
AUTH_PASSWORD_VALIDATORS = u'********************'
SECURE_CONTENT_TYPE_NOSNIFF = False
COMPRESS_OFFLINE_MANIFEST = u'manifest.json'
SITE_ID = 1
X_FRAME_OPTIONS = 'DENY'
USE_THOUSAND_SEPARATOR = False
TEMPLATE_STRING_IF_INVALID = ''
COMPRESS_OFFLINE = True
COMPRESS_ROOT = '/app/staticfiles'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = u''
MANAGERS = []
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
GMAIL_PASSWORD = u'********************'
SESSION_COOKIE_PATH = '/'
COMPRESS_JS_COMPRESSOR = u'compressor.js.JsCompressor'
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '.withinreachgroup.com', '.fathomless-harbor-44165.herokuapp.com', '.herokuapp.com']
COMPRESS_OFFLINE_TIMEOUT = 31536000
TIME_FORMAT = 'P'
COMPRESS_CSS_FILTERS = [u'compressor.filters.css_default.CssAbsoluteFilter']
LANGUAGE_COOKIE_PATH = '/'
LOGGING_CONFIG = 'logging.config.dictConfig'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
LOGIN_URL = '/accounts/login/'
DEFAULT_INDEX_TABLESPACE = ''
evansd commented 7 years ago

@paulnicholsen27 I've had a look, but I'm not familiar enough with django-compress to work out what's going on.

The only thing I think of though is to double-check that ./manage.py compress is being run when you push to Heroku. You'll need to create bin/post_compile script to do this. There are some examples here: https://github.com/nigma/heroku-django-cookbook/tree/master/bin

Hope that helps.

rsmithlal commented 4 years ago

@paulnicholsen27 I've had a look, but I'm not familiar enough with django-compress to work out what's going on.

The only thing I think of though is to double-check that ./manage.py compress is being run when you push to Heroku. You'll need to create bin/post_compile script to do this. There are some examples here: https://github.com/nigma/heroku-django-cookbook/tree/master/bin

Hope that helps.

Thank you @evansd, your suggestion solved the problem for me. I had no idea that you could hook into the buildpack life cycle like that!

FahimAhamed101 commented 2 years ago

move installed apps like this
'django.contrib.staticfiles', 'ckeditor', 'ckeditor_uploader', i hope it will solve the problem