Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You have requested to collect static files at the destination
- location as specified in your settings.
- This will overwrite existing files!
- Are you sure you want to do this?
- Type 'yes' to continue, or 'no' to cancel: yes
- Traceback (most recent call last):
- File "manage.py", line 10, in <module>
- execute_from_command_line(sys.argv)
- File "/home/damian/proj1/local/lib/python2.7/site- packages/django/core/management/__init__.py", line 353, in execute_from_command_line
- utility.execute()
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
- self.fetch_command(subcommand).run_from_argv(self.argv)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
- self.execute(*args, **cmd_options)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
- output = self.handle(*args, **options)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 176, in handle
- collected = self.collect()
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 107, in collect
- handler(path, prefixed_path, storage)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 325, in copy_file
- if not self.delete_file(path, prefixed_path, source_storage):
- File "/home/damian/proj1/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 238, in delete_file
- if self.storage.exists(prefixed_path):
- File "/home/damian/proj1/local/lib/python2.7/site-packages/storages/backends/s3boto.py", line 446, in exists
- return k.exists()
- File "/home/damian/proj1/local/lib/python2.7/site-packages/boto/s3/key.py", line 539, in exists
- return bool(self.bucket.lookup(self.name, headers=headers))
- File "/home/damian/proj1/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 143, in lookup
- return self.get_key(key_name, headers=headers)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 193, in get_key
- key, resp = self._get_key_internal(key_name, headers, query_args_l)
- File "/home/damian/proj1/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 231, in _get_key_internal
- response.status, response.reason, '')
- boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden
- DEBUG = True
- ALLOWED_HOSTS = []
- EMAIL_HOST = 'smtp.gmail.com'
- EMAIL_HOST_USER = ''
- EMAIL_HOST_PASSWORD = ''
- EMAIL_PORT = 587
- EMAIL_USE_TLS = True
- # Application definition
- INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'blogapp',
- 'crispy_forms',
- 'storages',
- ]
- MIDDLEWARE_CLASSES = [
- 'django.middleware.security.SecurityMiddleware',
- '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',
- ]
- ROOT_URLCONF = 'blog.urls'
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- ],
- },
- },
- ]
- WSGI_APPLICATION = 'blog.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
- # Internationalization
- # https://docs.djangoproject.com/en/1.9/topics/i18n/
- LANGUAGE_CODE = 'en-us'
- DEFAULT_CHARSET = 'utf-8'
- TIME_ZONE = 'Europe/Berlin'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.9/howto/static-files/
- STATIC_URL = '/static/'
- STATIC_ROOT = os.path.join(BASE_DIR, "static_in_env", "static_root")
- STATICFILES_DIRS = (
- os.path.join(BASE_DIR, "static_in_pro", "our_static"),
- #'/var/www/static/',
- )
- MEDIA_URL = '/media/'
- MEDIA_ROOT = os.path.join(BASE_DIR, "static_in_env", "media_root")
- CRISPY_TEMPLATE_PACK = 'bootstrap3'
- MEDIAFILES_DIRS = (MEDIA_ROOT)
- #AWS S3 STATICK FILES
- AWS_HEADERS = { # see http://developer.yahoo.com/performance/rules.html#expires
- 'Expires': 'Thu, 31 Dec 2099 20:00:00 GMT',
- 'Cache-Control': 'max-age=94608000',
- }
- AWS_STORAGE_BUCKET_NAME = '***'
- AWS_ACCESS_KEY_ID = '***'
- AWS_SECRET_ACCESS_KEY = '***'
- # Tell django-storages that when coming up with the URL for an item in S3 storage, keep
- # it simple - just use this domain plus the path. (If this isn't set, things get complicated).
- # This controls how the `static` template tag from `staticfiles` gets expanded, if you're using it.
- # We also use it in the next setting.
- AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
- # This is used by the `static` template tag from `static`, if you're using that. Or if anything else
- # refers directly to STATIC_URL. So it's safest to always set it.
- STATIC_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
- # Tell the staticfiles app to use S3Boto storage when writing the collected static files (when
- # you run `collectstatic`).
- STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
- #For Heroku
- import dj_database_url
- DATABASES['default'] = dj_database_url.config()
- SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
- ALLOWED_HOSTS = ['*']
- DEBUG = False
- try:
- from .local_settings import *
- except ImportError:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement