14
Added this in the settings.py
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
},
},
}
Got the errors in the log
Apparently there was a mismatch with the names of the folders in the remote server and my local machine
8
Try making migrations with:
heroku run python manage.py makemigrations
heroku run python manage.py migrate
I had the same issue, but this solved it.
4
While turning off Debugging.
You need to provide ALLOWED_HOSTS in a list. Please check Django documentation for more..
Debug = False
ALLOWED_HOSTS = ['xyz.com']
- [Django]-How do I send XML POST data from an iOS app to a Django app?
- [Django]-'ascii' codec can't decode byte 0xe2 in position 5367: ordinal not in range(128)
- [Django]-CSRF verification failed after adding a filefield on model
- [Django]-How to use Apache to serve Django server and React client?
- [Django]-Import modules that are above project root
3
You need to provide ALLOWED_HOSTS
Debug = False
ALLOWED_HOSTS = [".herokuapp.com"]
And Heroku you should use PostgreSQL
- [Django]-How to add a new instance of Django model with FileField by ModelForm?
- [Django]-How do I send XML POST data from an iOS app to a Django app?
- [Django]-Django occasionally throwing a NoReverseMatch
- [Django]-Django ORM access optimization with Filter
- [Django]-Django β Generate form based on queryset
3
In my case it was due to conflict between
django staticfiles
and django _heroku staticfiles
I had to disable one of them.
Either do this,
` INSTALLED_APPS={
.
.
#django.contrib.staticfiles,
}
django_heroku.settings(locals())` #in end of settings.py
Or do this
`INSTALLED_APPS={
.
.
django.contrib.staticfiles,
}
django_heroku.settings(locals(),staticfiles=False)` #in end of settings.py
Or if you are using whitenoise
,disable staticfiles for both django and django_heroku.
- [Django]-Django + jQuery: Why CSRF verification fails on multiple simultaneous requests
- [Django]-How do i make a functioning Delete confirmation popup in Django using Bootstrap4 Modal
- [Django]-Optimizing djangos count() method
- [Django]-I have multiple django tables and want to query the tables in parallel
- [Django]-Django & Nginx deeplinking domains (re-write rules or django urls?)
Source:stackexchange.com