change logging

This commit is contained in:
Oliver Marks 2018-01-29 20:13:16 +00:00
parent 579478bb87
commit ab36e264c1
4 changed files with 6 additions and 23 deletions

View File

@ -495,3 +495,5 @@ X_FRAME_OPTIONS = 'SAMEORIGIN'
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400',
}
COMPRESS_URL = 'cache/'

View File

@ -98,8 +98,6 @@ CAPTCHA = {
'site': ''
}
WHITENOISE_AUTOREFRESH = True
WHITENOISE_USE_FINDERS = True
LOGGING = {
'version': 1,
@ -126,11 +124,6 @@ LOGGING = {
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
'logfile': {
'level':'DEBUG',
'class':'logging.FileHandler',
'filename': "%s/django.log" % ROOT_DIR,
},
},
'loggers': {
'django.request': {
@ -161,6 +154,3 @@ AWS_S3_OBJECT_PARAMETERS = {
AWS_S3_SECURE_URLS = True
STATIC_URL = '%s/%s/' % (AWS_S3_ENDPOINT_URL, AWS_STORAGE_BUCKET_NAME)
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
COMPRESS_URL = 'static/'
#/'%s/%s/' % (AWS_S3_ENDPOINT_URL, AWS_STORAGE_BUCKET_NAME)

View File

@ -50,7 +50,7 @@ X_FRAME_OPTIONS = 'ALLOW-FROM https://riot.im'
# ------------------------------------------------------------------------------
# Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/1.6/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', default=['maidstone-hackspace.org.uk', 'live.maidstone-hackspace.org.uk', 'www.maidstone-hackspace.org.uk'])
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', default=['maidstone-hackspace.org.uk', 'live.maidstone-hackspace.org.ukhackdev_postgres_data_dev', 'www.maidstone-hackspace.org.uk'])
ALLOWED_HOSTS.append('127.0.0.1')
ALLOWED_HOSTS.append('172.18.0.5')
@ -192,7 +192,7 @@ LOGGING = {
'logfile': {
'level':'DEBUG',
'class':'logging.FileHandler',
'filename': "%s/django.log" % ROOT_DIR,
'filename': "/tmp/django.log"
},
},
'loggers': {
@ -235,4 +235,3 @@ STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
# ------------------------------------------------------------------------------
COMPRESS_STORAGE = STATICFILES_STORAGE
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
COMPRESS_URL = STATIC_URL

View File

@ -90,15 +90,9 @@ AWS_HEADERS = {
# MEDIA_URL = ''
# Static Assets
# ------------------------
# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
# COMPRESSOR
# ------------------------------------------------------------------------------
COMPRESS_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
COMPRESS_URL = STATIC_URL
# COMPRESS_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
# EMAIL
# ------------------------------------------------------------------------------
@ -201,7 +195,7 @@ LOGGING = {
'logfile': {
'level':'DEBUG',
'class':'logging.FileHandler',
'filename': "%s/django.log" % ROOT_DIR,
'filename': "/tmp/django.log"
},
},
'loggers': {
@ -239,5 +233,3 @@ AWS_LOCATION = 'stage'
STATIC_URL = '%s/%s/%s/' % (AWS_S3_ENDPOINT_URL, AWS_STORAGE_BUCKET_NAME, AWS_LOCATION)
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
COMPRESS_URL = STATIC_URL