Hi,
I divided my settings into different files, but I think it's not working on 
Heroku, here are my code:

# This is abcd/setting/hk.py
from .base import *
import dj_database_url


DATABASES = {
 'default': dj_database_url.config()
}


ALLOWED_HOSTS.append('abcdmyapp.herokuapps.com')
WSGI_APPLICATION = 'abcd.wsgi.hk.application'
MIDDLEWARE.append('whitenoise.middleware.WhiteNoiseMiddleware')

DEBUG = False


I doubt these two configurations because I still can run my app in debug 
mode but got a error about not allowing the host and there is no folder 
created for static files.


More info:

# This is base.py
# no DATABASES, DEBUG and WSGI_APPLICATION

ALLOWED_HOSTS = ['127.0.0.1']
MIDDLEWARE = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    ....
]


# This is Procfile

web: gunicorn abcd.wsgi.hk 
release: python manage.py migrate
web: python manage.py runserver 0.0.0.0:$PORT

# This is abcd/wsgi/hk.py
 
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "abcd.settings.hk")
application = get_wsgi_application()



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a6fe85d-2349-4b58-86df-6e2a4df00500%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to