Q: Django : Heroku deploy Error 500 on app pages but admin working I am trying to deploy my django app on to heroku. It success fully working if in Procfile: web: python manage.py runserver.
After updating the settings to local and production and in production.py DEBUG=False is causing the error 500 page from my django app. 
But if I am navigating to appname.herokuapp.com/admin the css files are broken but I can still access the app admin pages. Look at my project file tree:

settings folder in project

settings
  │   base.py
  │   local.py
  │   production.py
  │   __init__.py
  │


production.py

from django.core.exceptions import ImproperlyConfigured
import logging

try:
    from .base import *
    import dj_database_url

    SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

    # Update database configuration with $DATABASE_URL.

    ALLOWED_HOSTS = ['www.appname.herokuapp.com', 'appname.herokuapp.com']

    log = logging.getLogger(__name__)

    log.info(msg='Setting is from production.py')

    DEBUG = False

    ADMIN = ('admin','xxx@gmail.com' )

    # Get production configuration
    SECRET_KEY = os.environ.get('SECRET_KEY')

    DATABASES['default'] = dj_database_url.config()

except (ImportError, ImproperlyConfigured) as e:

    print('Error occurred while importing the base.py in production.py')


Procfile

web: gunicorn project.wsgi

The app is deployed successfully and I can navigate through the admin pages, but not the applications
Upon research I thought this might be the issue with ALLOWED_HOST=[] but unable to get ALLOWED_HOST=['appname.herokuapp.com'] without adding [*] to it.

heroku logs

2017-01-18T14:45:44.802163+00:00 heroku[web.1]: Restarting
2017-01-18T14:45:44.804042+00:00 heroku[web.1]: State changed from up to starting
2017-01-18T14:45:45.669518+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-01-18T14:45:45.687608+00:00 app[web.1]: [2017-01-18 14:45:45 +0000] [9] [INFO] Worker exiting (pid: 9)
2017-01-18T14:45:45.688006+00:00 app[web.1]: [2017-01-18 14:45:45 +0000] [4] [INFO] Handling signal: term
2017-01-18T14:45:45.688703+00:00 app[web.1]: [2017-01-18 14:45:45 +0000] [8] [INFO] Worker exiting (pid: 8)
2017-01-18T14:45:45.888782+00:00 app[web.1]: [2017-01-18 14:45:45 +0000] [4] [INFO] Shutting down: Master
2017-01-18T14:45:46.119617+00:00 heroku[web.1]: Process exited with status 0
2017-01-18T14:45:50.356542+00:00 heroku[web.1]: Starting process with command `gunicorn vnc.wsgi --log-file=-`
2017-01-18T14:45:52.894929+00:00 app[web.1]: [2017-01-18 14:45:52 +0000] [4] [INFO] Starting gunicorn 19.6.0
2017-01-18T14:45:52.895493+00:00 app[web.1]: [2017-01-18 14:45:52 +0000] [4] [INFO] Listening at: http://0.0.0.0:57728 (4)
2017-01-18T14:45:52.895580+00:00 app[web.1]: [2017-01-18 14:45:52 +0000] [4] [INFO] Using worker: sync
2017-01-18T14:45:52.898787+00:00 app[web.1]: [2017-01-18 14:45:52 +0000] [8] [INFO] Booting worker with pid: 8
2017-01-18T14:45:52.993553+00:00 app[web.1]: [2017-01-18 14:45:52 +0000] [9] [INFO] Booting worker with pid: 9
2017-01-18T14:45:54.055081+00:00 heroku[web.1]: State changed from starting to up
2017-01-18T14:46:22.582563+00:00 heroku[router]: at=info method=GET path="/"               ost=.herokuapp.com request_id=196fad42-b37e-4c02-a8e4-06ff5947b77d fwd="208.23.227.53" dyno=web.1 connect=0ms service=272ms status=500 bytes=384
2017-01-18T14:46:24.750287+00:00 heroku[router]: at=info method=GET path="/" host=.herokuapp.com request_id=060c7e6e-fa6c-46be-823d-3993a43fae00 fwd="208.23.227.53" dyno=web.1 connect=6ms service=75ms status=500 bytes=384
2017-01-18T14:46:25.809511+00:00 heroku[router]: at=info method=GET path="/" host=.herokuapp.com request_id=9bc94eb6-d864-4d77-8c02-3d136fdf48dd fwd="208.23.227.53" dyno=web.1 connect=0ms service=76ms status=500 bytes=384
2017-01-18T14:46:27.536300+00:00 heroku[router]: at=info method=GET path="/" host=.herokuapp.com request_id=7dca33df-c100-4a33-8f51-b3e0b9c0f8d5 fwd="208.23.227.53" dyno=web.1 connect=0ms service=108ms status=500 bytes=384
2017-01-18T14:47:56.441121+00:00 heroku[router]: at=info method=GET path="/" host=.herokuapp.com request_id=a5823328-a871-4d1f-80ea-b75b7e288dbe fwd="208.23.227.53" dyno=web.1 connect=0ms service=57ms status=500 bytes=384
2017-01-18T14:47:59.133729+00:00 heroku[router]: at=info method=GET path="/admin/" host=.herokuapp.com request_id=5d482ad9-5485-4a15-94bc-3864f104257d fwd="208.23.227.53" dyno=web.1 connec t=0ms service=227ms status=200 bytes=7819
2017-01-18T14:47:59.232750+00:00 heroku[router]: at=info method=GET path="/static/admin/css/dashboard.4898e2e9983d.css" host=.herokuapp.com request_id=b64f6087-7e64-4f76-883b-b5328ee591ce fwd="208.23.227.53" dyno=web.1 connect=1ms service=4ms status=404 bytes=358
2017-01-18T14:47:59.214759+00:00 heroku[router]: at=info method=GET path="/static/admin/css/base.ba3dc2f88fc5.css" host=.herokuapp.com request_id=8474679b-ef79-4753-9afc-31bef9f5b179 fwd=" 208.23.227.53" dyno=web.1 connect=0ms service=4ms status=404 bytes=358


A: Okay finally after going through many posts over this issues got the culprit.
There were few css images that weren't being properly added, after adding all the css files the project finally is running.
Just a heads up for everyone who are deploying using whitenoise, try to run the heroku app locally  from cli. Try to run collectstatic and if there are any other commands that are probably used on the heroku.
Do add the  ADMIN and 
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = os.getenv('email')
EMAIL_HOST_PASSWORD = os.getenv('pass')
EMAIL_PORT = 587
EMAIL_USE_TLS = True
SERVER_EMAIL = EMAIL_HOST_USER

they come handy if anythign fails.
