I am trying to deploy my Django application to Heroku. When i try to deploy the app with, I get the following error log in Heroku:
-----> Python app detected
! Python has released a security update! Please consider upgrading to python-3.7.7
Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.7.5
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
Traceback (most recent call last):
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 27, in _enumerate_items
yield next(non_metadata), next(non_metadata)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/project.py", line 438, in _parse_pipfile
return contoml.loads(contents)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
elements = parse_tokens(tokens)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
return _parse_token_stream(TokenStream(tokens))
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 29, in _parse_token_stream
elements, pending = toml_file_elements(token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 375, in toml_file_elements
captured = capture_from(token_stream).find(one).or_find(file_entry_element).or_empty()
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
element, pending_ts = finder(self._token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 372, in one
c1 = capture_from(ts1).find(file_entry_element).and_find(toml_file_elements)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 109, in and_find
return Capturer(self.pending_tokens, self.value()).find(finder)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
element, pending_ts = finder(self._token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 375, in toml_file_elements
captured = capture_from(token_stream).find(one).or_find(file_entry_element).or_empty()
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
element, pending_ts = finder(self._token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 372, in one
c1 = capture_from(ts1).find(file_entry_element).and_find(toml_file_elements)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
element, pending_ts = finder(self._token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 365, in file_entry_element
or_find(table_body_element)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 79, in or_find
return Capturer(self._token_stream).find(finder)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
element, pending_ts = finder(self._token_stream)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 350, in table_body_element
return TableElement(captured.value()), captured.pending_tokens
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/table.py", line 22, in __init__
self._check_for_duplicate_keys()
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/table.py", line 25, in _check_for_duplicate_keys
if len(set(self.keys())) < len(self.keys()):
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 37, in keys
return tuple(key for (key, _) in self.items())
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 37, in <genexpr>
return tuple(key for (key, _) in self.items())
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 30, in items
for (key_i, key), (value_i, value) in self._enumerate_items():
RuntimeError: generator raised StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.heroku/python/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/cli.py", line 402, in install
selective_upgrade=selective_upgrade,
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/core.py", line 1785, in do_install
pre = project.settings.get('allow_prereleases')
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/project.py", line 446, in settings
return self.parsed_pipfile.get('pipenv', {})
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/project.py", line 392, in parsed_pipfile
parsed = self._parse_pipfile(contents)
File "/app/.heroku/python/lib/python3.7/site-packages/pipenv/project.py", line 441, in _parse_pipfile
return toml.loads(contents)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/toml.py", line 373, in loads
multibackslash)
File "/tmp/build_42417f10e9aa3fe5c0ff0fdc5c0d7ca7/.heroku/python/lib/python3.7/site-packages/pipenv/vendor/toml.py", line 454, in _load_line
raise TomlDecodeError("Invalid date or number")
toml.TomlDecodeError: Invalid date or number
! Push rejected, failed to compile Python app.
! Push failed
My runtime.txt:
python-3.7.5
My requirements.txt:
asgiref==3.2.7
astroid==2.3.3
certifi==2019.11.28
chardet==3.0.4
Django==3.0.5
django-crispy-forms==1.9.0
django-el-pagination==3.3.0
goodreads==0.3.2
gunicorn==20.0.4
idna==2.9
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
nose==1.3.7
Pillow==7.0.0
pkg-resources==0.0.0
psycopg2==2.8.5
pylint==2.4.4
pytz==2019.3
rauth==0.7.3
requests==2.23.0
six==1.14.0
sorl-thumbnail==12.6.3
sqlparse==0.3.1
typed-ast==1.4.1
urllib3==1.25.8
wrapt==1.11.2
xmltodict==0.12.0
whitenoise==5.1.0
dj-database-url==0.5.0
uwsgi==2.0.17
django-csp==3.6
My Pipfile.lock:
{
"_meta": {
"hash": {
"sha256": "05f57affc50d09f27e1db93177b9fc50a9f473b0f3a22835285f9deb577d5650"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"asgiref": {
"hashes": [
"sha256:8036f90603c54e93521e5777b2b9a39ba1bad05773fcf2d208f0299d1df58ce5",
"sha256:9ca8b952a0a9afa61d30aa6d3d9b570bb3fd6bafcf7ec9e6bed43b936133db1c"
],
"version": "==3.2.7"
},
"django": {
"hashes": [
"sha256:642d8eceab321ca743ae71e0f985ff8fdca59f07aab3a9fb362c617d23e33a76",
"sha256:d4666c2edefa38c5ede0ec1655424c56dc47ceb04b6d8d62a7eac09db89545c1"
],
"index": "pypi",
"version": "==3.0.5"
},
"gunicorn": {
"hashes": [
"sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626",
"sha256:cd4a810dd51bf497552cf3f863b575dabd73d6ad6a91075b65936b151cbf4f9c"
],
"index": "pypi",
"version": "==20.0.4"
},
"pytz": {
"hashes": [
"sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d",
"sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"
],
"version": "==2019.3"
},
"sqlparse": {
"hashes": [
"sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e",
"sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548"
],
"version": "==0.3.1"
}
},
"develop": {
"astroid": {
"hashes": [
"sha256:71ea07f44df9568a75d0f354c49143a4575d90645e9fead6dfb52c26a85ed13a",
"sha256:840947ebfa8b58f318d42301cf8c0a20fd794a33b61cc4638e28e9e61ba32f42"
],
"version": "==2.3.3"
},
"isort": {
"hashes": [
"sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1",
"sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"
],
"version": "==4.3.21"
},
"lazy-object-proxy": {
"hashes": [
"sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d",
"sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449",
"sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08",
"sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a",
"sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50",
"sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd",
"sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239",
"sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb",
"sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea",
"sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e",
"sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156",
"sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142",
"sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442",
"sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62",
"sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db",
"sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531",
"sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383",
"sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a",
"sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357",
"sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4",
"sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"
],
"version": "==1.4.3"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"pylint": {
"hashes": [
"sha256:3db5468ad013380e987410a8d6956226963aed94ecb5f9d3a28acca6d9ac36cd",
"sha256:886e6afc935ea2590b462664b161ca9a5e40168ea99e5300935f6591ad467df4"
],
"index": "pypi",
"version": "==2.4.4"
},
"six": {
"hashes": [
"sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a",
"sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c"
],
"version": "==1.14.0"
},
"typed-ast": {
"hashes": [
"sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355",
"sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919",
"sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa",
"sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652",
"sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75",
"sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01",
"sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d",
"sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1",
"sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907",
"sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c",
"sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3",
"sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b",
"sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614",
"sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb",
"sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b",
"sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41",
"sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6",
"sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34",
"sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe",
"sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4",
"sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"
],
"markers": "implementation_name == 'cpython' and python_version < '3.8'",
"version": "==1.4.1"
},
"wrapt": {
"hashes": [
"sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1"
],
"version": "==1.11.2"
}
}
}
My Pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
pylint = "*"
[packages]
asgiref==3.2.7
astroid==2.3.3
certifi==2019.11.28
chardet==3.0.4
dj-database-url==0.5.0
Django==3.0.5
django-crispy-forms==1.9.0
django-csp==3.6
django-el-pagination==3.3.0
goodreads==0.3.2
gunicorn==20.0.4
idna==2.9
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
nose==1.3.7
Pillow==7.0.0
pkg-resources==0.0.0
psycopg2==2.8.5
pylint==2.4.4
pytz==2019.3
rauth==0.7.3
requests==2.23.0
six==1.14.0
sorl-thumbnail==12.6.3
sqlparse==0.3.1
typed-ast==1.4.1
urllib3==1.25.8
whitenoise==5.1.0
wrapt==1.11.2
xmltodict==0.12.0
[requires]
python_version = "3.7.5"
My settings.py:
"""
Django settings for bookclub project.
Generated by 'django-admin startproject' using Django 3.0.4.
account/admin
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
with open('bookclub/secret_key.txt') as f:
SECRET_KEY = f.read().strip()
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG_PROPAGATE_EXCEPTIONS = True
# DEBUG = int(os.environ.get('DEBUG', default=1))
ALLOWED_HOSTS = ['*']
LOGIN_REDIRECT_URL = 'account:dashboard'
LOGIN_URL = 'account:login'
LOGOUT_URL = 'account:logout'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = "smtp.gmail.com"
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'mymail555@gmail.com'
EMAIL_HOST_PASSWORD = "password123"
# Application definition
MEDIA_URL = '/images/'
MEDIA_ROOT = os.path.join(BASE_DIR, '') # not images, because i take that from the outer folder
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
INSTALLED_APPS = [
'book',
'landing',
'account',
'club',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'sorl.thumbnail',
'crispy_forms',
'ajaximage',
'el_pagination',
]
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.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'bookclub.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',
'django.template.context_processors.request', # For EL-pagination
],
},
},
]
WSGI_APPLICATION = 'bookclub.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bookclubdb',
'USER': 'user',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '', # default value: 5432
}
}
# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Content Security Policy(experimental)
CSP_DEFAULT_SRC = ("'self'", )
CSP_STYLE_SRC = ("'self'", "'unsafe-inline'", "*")
CSP_SCRIPT_SRC = ("'self'", "'unsafe-inline'", "*")
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
AJAXIMAGE_AUTH_TEST = lambda u: True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# Heroku: Update database configuration from $DATABASE_URL.
import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# production values
CORS_REPLACE_HTTPS_REFERER = False
HOST_SCHEME = "http://"
SECURE_PROXY_SSL_HEADER = None
SECURE_SSL_REDIRECT = False
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
SECURE_HSTS_SECONDS = None
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_FRAME_DENY = False
This is my first time deploying a Django app, so it's possible that I'm missing something obvious. Any help would be greatly appreciated. If you need any additional information, feel free to ask for it and I will do my best to provide it. Thanks!
I fixed the issue, by changing the syntax in my Pipfile
From:
module==1.1.1
To:
module= "==1.1.1"
Hope this helps someone with the same problem
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.